machine / machine.specifications

Machine.Specifications is a Context/Specification framework for .NET that removes language noise and simplifies tests.
MIT License
885 stars 178 forks source link

Build fails in VS Professional 2017 #333

Closed jbtibor closed 7 years ago

jbtibor commented 7 years ago

I downloaded the latest code as zip. Opened machine.vstestadapter.sln in VS2017.

I have these errors in Package Manager console: Error occurred while restoring NuGet packages: The operation failed as details for project SampleSpecs could not be loaded. Error occurred while restoring NuGet packages: The operation failed as details for project Machine.VSTestAdapter could not be loaded.

Then I get this error during build: Build started ... Build Failure. Error: 'path' cannot be an empty string ("") or start with the null character. Parameter name: path ========== Build: 0 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== Calculating project dependencies...

jbtibor commented 7 years ago

Tried in VS2015 and projects don't load: machine.vstestadapter-master\Source\Machine.VSTestAdapter\Machine.VSTestAdapter.csproj : error : The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.

ivanz commented 7 years ago

Hey,

I've pushed a change to master which should fix that. Basically the code is still using the then-new-but-now-deprecated-and-old .xproj / project.json and needs to be converted to the new .csproj format. To make it work I had to specify an old dotnet SDK version in global.json. I've just opened it in Visual Studio 2017 after this change and is asking to convert it and it failed, so we will have to convert it manually and update the CI.

ivanz commented 7 years ago

I've converted the solution from project.json to new-style .csproj and it works fine in Visual Studio 2017 now.