Some changes.

This commit is contained in:
Shin Mao 2017-09-22 11:33:11 -07:00 committed by GitHub
parent fa4467f5b7
commit 14fee3a2dd

View file

@ -13,15 +13,15 @@ The instructions assume you are using [.NET Core SDK daily builds](https://githu
1. cd into it, e.g. `cd MyData`
1. Add a `nuget.config` file in the root of the project, using the following:
* `dotnet new nuget`
* Edit the new `nuget.config`. Remove `<clear />` and add the following line,
* `dotnet new nuget`
* Edit the new `nuget.config`. Remove `<clear />` and add the following line,
`<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />`
* The final file should look like [nuget.config](nuget.config).
* The final file should look like [nuget.config](nuget.config).
4. `dotnet add package Microsoft.XmlSerializer.Generator -v 1.0.0-preview1-25718-03`
4. Add the following lines in MyData.csproj. The version must match the package version.
4. Add the following lines in MyData.csproj.
```xml
<ItemGroup>
@ -29,12 +29,10 @@ The instructions assume you are using [.NET Core SDK daily builds](https://githu
</ItemGroup>
```
6. Run `dotnet restore` to retore the package.
6. Run `dotnet restore`.
6. Run `dotnet build` to build the package.
If all succeed, a file named <AssemblyName>.XmlSerializers.dll will be generated under the debug folder. You should check the warning in the output window if the serializer fail to generate.
6. Run `dotnet build` to build the package. If all succeed, a file named <AssemblyName>.XmlSerializers.dll will be generated under the output folder. You would see warnings in the output window if the serializer fail to generate.
6. Create a console app and add a project reference for the library. Build and the library assembly and its generated serializer will all be in the output folder of the console app.
6. Create a console app and add a project reference to the library. Building the app will generate serialization code for the library and the assembly will be copied to the output folder of the app.
6. Run `dotnet publish` to publish the package.
The generated serializer will be copied to the `PublishOutput` folder as well as the output assembly.
6. Run `dotnet publish` to publish the app.