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

Errors in sample project when removed from the repo directory and rebuilt #106

Open
MenelvagorMilsom opened this issue Jan 14, 2020 · 0 comments
Labels
bug Something isn't working Samples
Milestone

Comments

@MenelvagorMilsom
Copy link

Overview

While looking at the sample projects I noticed some warnings/errors showed up on rebuild of SimpleNuGetDependency. The errors only show if the sample project is moved outside of the msb4u repo. The errors do not repeat on subsequent builds, nor do they prevent simulation in the Unity editor.

C:\Users\nimilsom\Desktop\SimpleNuGetDependency.Unity\Assets\NewtonsoftDependency> dotnet msbuild NewtonsoftDependency.csproj -restore  -v:minimal -p:NuGetInteractive=true  -t:Rebuild -p:Configuration=Release
C:\Users\nimilsom\Desktop\SimpleNuGetDependency.Unity\Assets\NewtonsoftDependency\NewtonsoftDependency.csproj : warning NU1604: Project dependency MSBuildForUnity does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
C:\Users\nimilsom\Desktop\SimpleNuGetDependency.Unity\Assets\NewtonsoftDependency\NewtonsoftDependency.csproj : warning NU1604: Project dependency MSBuildForUnity does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
C:\Users\nimilsom\.nuget\packages\msbuildforunity\0.1.115888\buildCommon\UnityMetaFileGenerator.targets(147,5): error : MSB4801: The task factory "CodeTaskFactory" is not supported on the .NET Core version of MSBuild. [C:\Users\nimilsom\Desktop\SimpleNuGetDependency.Unity\Assets\NewtonsoftDependency\NewtonsoftDependency.csproj]
C:\Users\nimilsom\.nuget\packages\msbuildforunity\0.1.115888\buildCommon\UnityMetaFileGenerator.targets(147,5): error MSB4175: The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files\dotnet\sdk\3.1.100\Microsoft.Build.Tasks.Core.dll". The task factory must return a value for the "TaskType" property. [C:\Users\nimilsom\Desktop\SimpleNuGetDependency.Unity\Assets\NewtonsoftDependency\NewtonsoftDependency.csproj]

Here's a link to the full logs for these warnings/errors which include the callstack:
https://gist.github.com/MenelvagorMilsom/c68be7ae3581b9abccac7809b13f45fd

Repro Steps

"scopedRegistries": [
    {
        "name": "Microsoft",
        "url": "https://pkgs.dev.azure.com/UnityDeveloperTools/MSBuildForUnity/_packaging/UnityDeveloperTools/npm/registry/",
        "scopes": [
            "com.microsoft"
        ]
    }
],
"com.microsoft.msbuildforunity": "0.8.3"
  • Open the Unity project and select Rebuild All Projects.
  • Observe errors printed to the editor console.
@andreiborodin andreiborodin added this to the 0.9.0 Release milestone Jan 14, 2020
@andreiborodin andreiborodin added bug Something isn't working Samples labels Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Samples
Projects
None yet
Development

No branches or pull requests

2 participants