Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiling the .NET 2.0 version of Mock Assembly in VS2017 #220

Merged
merged 3 commits into from
May 10, 2017

Conversation

rprouse
Copy link
Member

@rprouse rprouse commented May 7, 2017

Fixes #216

This is the same fix I had to do to the main NUnit solutions. If .NET Core is installed and we have .NET Core projects in that directory, then standard desktop .NET Projects need the project.json file.

I don't know why this was working on AppVeyor or if other people are having the same problem, but it fixes it for me.

@rprouse
Copy link
Member Author

rprouse commented May 9, 2017

@jnm2 I've pulled the docker changes that you made to the NUnit repo into this PR to help me track down why the Linux builds are failing with such a trivial change. I really like it, thanks 👍

@@ -9,6 +9,7 @@ Note that assemblies in one layer must not reference those in any other layer, e
Developers should make sure not to introduce any other references.

There are two ways to build NUnit: using the solution file in an IDE or through the build script.
See also [Building and testing for Linux on a Windows machine](#building-and-testing-for-linux-on-a-windows-machine).
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything here copied verbatim from the NUnit repo.

continue;
}

docker run --rm -it -v ${PSScriptRoot}:/nunit-console -w=/nunit-console mono:4.2.4 bash build.sh $args
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use 4.2.4 instead of latest because latest is crashing with a mono bug and we are ignoring those builds in Travis. See #211

@@ -23,7 +23,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit.engine.tests.netstandard", "src\NUnitEngine\nunit.engine.tests.netstandard\nunit.engine.tests.netstandard.csproj", "{BC22F0E4-0862-4F82-A912-C9A447FECBAD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mock-assembly.netstandard", "src\NUnitEngine\mock-assembly\mock-assembly.netstandard.csproj", "{BC6C8155-2024-4F58-A006-18A15EA22A5C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mock-assembly.netstandard", "src\NUnitEngine\mock-assembly.netstandard\mock-assembly.netstandard.csproj", "{BC6C8155-2024-4F58-A006-18A15EA22A5C}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved the .NET Standard version of mock-assembly into its own directory. The newer version of NuGet didn't like finding the .NET Standard version in the main project for some reason and the project.json fix didn't work. I got tired of experimenting, so took the easy route out.

@rprouse
Copy link
Member Author

rprouse commented May 9, 2017

Build is passing now, so this is ready for review.

@CharliePoole CharliePoole merged commit f743a8f into master May 10, 2017
@CharliePoole CharliePoole deleted the issue-216 branch May 10, 2017 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiling mock-assembly in Visual Studio 2017 fails
2 participants