I have a .NET solution which has 2x projects:
- .NET Standard 1.6
- .NET 4.7 xUnit project
Unfortunately, I'm using a package in the xUnit project that doesn't work in a .NET Core xUnit project, which is why I'm using a .NET 4.7 project for unit testing.
So, i'm not sure how to do this with Visual Studio Team Services.
Previously, I've just had a .NET Standard Project and a .NET Core xUnit project and have the following:
- Get Sources (GIT)
- Restore (.NET Core)
- Build (.NET Core)
- Pack (.NET Core)
- NuGet Push
So - how do I :
- restore + build a .NET Core project
- and then the .NET 4.7 project
- and then run the xunit tests for the .NET 4.7 project
- and finally pack/nuget push the .NET Standard 1.6 project.
please?
EDIT:
here's what it looks like on my LOCALHOST machine when i try and do a normal dotnet restore
Notice:
- Hornet.Services.csproj
is restored.
- Hornet.Services.Tests.csproj
is not located or restored.
- Both projects are in my sln, as shown above with the screen shot above.
c:\Projects\Personal\Hornet\Hornet.Services>dotnet restore
Restoring packages for c:\Projects\Personal\Hornet\Hornet.Services\src\Hornet.Services\Hornet.Services.csproj...
Generating MSBuild file c:\Projects\Personal\Hornet\Hornet.Services\src\Hornet.Services\obj\Hornet.Services.csproj.nuget.g.props.
Writing lock file to disk. Path: c:\Projects\Personal\Hornet\Hornet.Services\src\Hornet.Services\obj\project.assets.json
Restore completed in 1.42 sec for c:\Projects\Personal\Hornet\Hornet.Services\src\Hornet.Services\Hornet.Services.csproj.
NuGet Config files used:
c:\Projects\Personal\Hornet\Hornet.Services\NuGet.Config
C:\Users\Pure Krome\AppData\Roaming\NuGet\NuGet.Config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
Feeds used:
https://api.nuget.org/v3/index.json
https://purekrome.pkgs.visualstudio.com/_packaging/Hornet-Dev/nuget/v3/index.json
c:\Projects\Personal\Hornet\Hornet.Services>
dotnet
CLI tools should be able to build/test/pack the projects.. – Martin Ullrich