jamesmontemagno / app-modules

A componentized app that has several smaller modules that are injested into the main app.
5 stars 1 forks source link

Could Not Restore Packages #1

Closed sharperDev2112 closed 5 years ago

sharperDev2112 commented 5 years ago

Description I get the following errors when trying to restore the packages on this solution.

Error Message / Trace The error message is "Could not restore packages" and the Package Console has a lot of data in it that looks like this:

Getting restore information for solution /Users/{user}/Projects/TestProjects/app-modules-master/ComponentApp.sln
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(168,3): error MSB4022: The result "" of evaluating the value "$(MicrosoftNETBuildExtensionsTasksAssembly)" of the "AssemblyFile" attribute in element <UsingTask> is not valid. [/Users/{user}/Projects/TestProjects/app-modules-master/Module1/Module1.iOSTestAp/Module1.iOSTestApp.csproj]

/usr/local/share/dotnet/sdk/2.1.505/Sdks/Microsoft.NET.Sdk/Sdk/Sdk.props(33,11): error MSB4226: The imported project "/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/xbuild/Current/Microsoft.Common.props" was not found. Also, tried to find "Current/Microsoft.Common.props" in the fallback search path(s) for $(MSBuildExtensionsPath) - "/Library/Frameworks/Mono.framework/External/xbuild/" . These search paths are defined in "/Library/Frameworks/Mono.framework/Versions/6.4.0/lib/mono/msbuild/Current/bin/MSBuild.dll.config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths. [/Users/{user}/Projects/TestProjects/app-modules-master/Module1/Module1.TestApp/Module1.TestApp.csproj]

All of our other projects are working fine. This just looked like a lighter weight way of accomplishing the componentizing of our apps (rather than include a bunch of Prism extras).

Steps to Reproduce

Environment Visual Studio for Mac version 8.3.1 (build 18) I also put a global.json file in the solution root since many of our projects have dependency on an older version of mono. It looks like this:

{
    "sdk": {
        "version": "2.1.505"
    }
}

Thanks for all your hard work, James. Any ideas on what I am doing wrong? I've read the MSBuild version may need to be changed to whatever you used but not sure how to do that. Thanks

sharperDev2112 commented 5 years ago

This is looking more like the frameworks installed and not this package. Argh!