Skip to content

error NU1101: Unable to find package MSBuildForUnity #173

@gyoce

Description

@gyoce

Hello,
I'm using Unity 2022.3.19f1
I have a Unity project, i modified the Packages/manifest.json to add to the start of the file the following` :

"scopedRegistries": [
    {
        "name": "Microsoft",
        "url": "https://pkgs.dev.azure.com/UnityDeveloperTools/MSBuildForUnity/_packaging/UnityDeveloperTools/npm/registry/",
        "scopes": [
            "com.microsoft"
        ]
    }
  ],

And i added to the bottom (in the dependencies section) the following : "com.microsoft.msbuildforunity": "0.9.2-20230322.1"

(PS: i also tried with the version "0.9.2-20221114.1" and "0.9.2-20211109.1")

After that when i try to go the Unity Editor after the loading screen i get an error message :

C:\Users\...\UnityGame\Assets\UnityGame.Dependencies.msb4u.csproj : error NU1101: Unable to find package MSBuildForUnity. No packages exist with this id in source(s): C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages, nuget.org
UnityEngine.Debug:LogError (object)
Microsoft.Build.Unity.MSBuildProjectBuilder:LogProgressMessage (string,Microsoft.Build.Unity.MSBuildProjectBuilder/ProgressMessageType) (at ./Library/PackageCache/com.microsoft.msbuildforunity@0.9.2-20230322.1/Editor/ProjectBuilder/MSBuildProjectBuilder.cs:385)
Microsoft.Build.Unity.MSBuildProjectBuilder/<>c__DisplayClass13_0:<BuildProjects>b__1 (System.ValueTuple`2<int, System.ValueTuple`2<string, Microsoft.Build.Unity.MSBuildProjectBuilder/ProgressMessageType>>) (at ./Library/PackageCache/com.microsoft.msbuildforunity@0.9.2-20230322.1/Editor/ProjectBuilder/MSBuildProjectBuilder.cs:213)
Microsoft.Build.Unity.MSBuildProjectBuilder/DelegateProgress`1<System.ValueTuple`2<int, System.ValueTuple`2<string, Microsoft.Build.Unity.MSBuildProjectBuilder/ProgressMessageType>>>:Report (System.ValueTuple`2<int, System.ValueTuple`2<string, Microsoft.Build.Unity.MSBuildProjectBuilder/ProgressMessageType>>) (at ./Library/PackageCache/com.microsoft.msbuildforunity@0.9.2-20230322.1/Editor/ProjectBuilder/MSBuildProjectBuilder.cs:516)
Microsoft.Build.Unity.MSBuildProjectBuilder/<>c__DisplayClass14_0:<BuildProjectsAsync>b__1 (System.ValueTuple`2<string, Microsoft.Build.Unity.MSBuildProjectBuilder/ProgressMessageType>) (at ./Library/PackageCache/com.microsoft.msbuildforunity@0.9.2-20230322.1/Editor/ProjectBuilder/MSBuildProjectBuilder.cs:330)
Microsoft.Build.Unity.MSBuildProjectBuilder/DelegateProgress`1<System.ValueTuple`2<string, Microsoft.Build.Unity.MSBuildProjectBuilder/ProgressMessageType>>:Report (System.ValueTuple`2<string, Microsoft.Build.Unity.MSBuildProjectBuilder/ProgressMessageType>) (at ./Library/PackageCache/com.microsoft.msbuildforunity@0.9.2-20230322.1/Editor/ProjectBuilder/MSBuildProjectBuilder.cs:516)
Microsoft.Build.Unity.MSBuildProjectBuilder/<>c__DisplayClass21_0:<ExecuteMSBuildAsync>b__0 (object,System.Diagnostics.DataReceivedEventArgs) (at ./Library/PackageCache/com.microsoft.msbuildforunity@0.9.2-20230322.1/Editor/ProjectBuilder/MSBuildProjectBuilder.cs:462)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

When i open the .csproj which is generated it has the same error :
Untitled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions