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

Build fails (moq 4.8.2) #611

Closed
mogikanin opened this issue Mar 29, 2018 · 3 comments
Closed

Build fails (moq 4.8.2) #611

mogikanin opened this issue Mar 29, 2018 · 3 comments

Comments

@mogikanin
Copy link

We've got an build error on our build server after updating from Moq 4.7.145.0 to 4.8.2

 (Rebuild target) (12) ->
(ImplicitlyExpandNETStandardFacades target) ->
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Micro
soft.NET.Build.Extensions.NETFramework.targets(65,5): error MSB4062: The "NETBuildExtensionsError" task could not be lo
aded from the assembly C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.B
uild.Extensions\\tools\net46\Microsoft.NET.Build.Extensions.Tasks.dll.  Confirm that the <UsingTask> declaration is cor
rect, that the assembly and all its dependencies are available, and that the task contains a public class that implemen
ts Microsoft.Build.Framework.ITask.

Moq 4.7.145 worked fine.
Also with 4.8.2 build works fine if we build project in Visual Studio, but doesn't work if we build it via cmd script.
The cmd script is quite simple:

%MsBuild% solutionfile.sln /t:Rebuild /p:Configuration=Release;TargetFramework=v4.6.1

Project target framework is 4.6.1

@stakx
Copy link
Contributor

stakx commented Mar 29, 2018

Sorry but without further information, I fail to see how this could be an issue with Moq. Moq is a NuGet package like any other, there's something wrong with your build script or process. Can you provide a minimal, standalone solution that exhibits this problem, along with an indication of which build tool versions you're using?

@mogikanin
Copy link
Author

ClassLibrary1.zip
Here the sample project. Try to build from Visual Studio, and then with script Build.bat.

@mogikanin
Copy link
Author

OK, found: Moq 4.8.2 has a dependency from System.Threading.Tasks.Extensions 4.3.0 which works fine. But if we update Tasks.Extensions to latest 4.4.0, then error occurs. So seems yes, it is not Moq fault.

@stakx stakx closed this as completed Mar 29, 2018
@stakx stakx removed the needs-repro label Mar 29, 2018
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

No branches or pull requests

2 participants