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

NU1201 - WatchOSApp is not compatible with xamarinios10 #5878

Open
ThumbGen opened this issue Apr 9, 2019 · 33 comments
Open

NU1201 - WatchOSApp is not compatible with xamarinios10 #5878

ThumbGen opened this issue Apr 9, 2019 · 33 comments

Comments

@ThumbGen
Copy link

@ThumbGen ThumbGen commented Apr 9, 2019

Steps to Reproduce

  1. Migrate a packages.config iOS project to use PackageReferences
  2. Keep the WatchOS project reference as it was:
{5e26a76d-a2ef-465d-81e2-9bf3943395d4} bla.WatchOSApp false true false

Expected Behavior

No errors

Actual Behavior

NU1201 - Project bla.WatchOSApp is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win-x86. Project bla.WatchOSApp supports: xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0) bla.iOS

Environment

Microsoft Visual Studio Enterprise 2019 
Version 16.0.0
VisualStudio.16.Release/16.0.0+28729.10
Microsoft .NET Framework
Version 4.7.03190

Installed Version: Enterprise

Visual C++ 2019   00435-60000-00000-AA861
Microsoft Visual C++ 2019

ADL Tools Service Provider   1.0
This package contains services used by Data Lake tools

Application Insights Tools for Visual Studio Package   9.0.20307.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2019   16.0.12311.10635
ASP.NET and Web Tools 2019

ASP.NET Web Frameworks and Tools 2019   16.0.12311.10635
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   16.0.12311.10635
Azure App Service Tools v3.0.0

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.3.7000.2
Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools   16.0.12311.10635
Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio   2.3.7000.2
Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools   3.0.0-beta4-19170-01+1deafee3682da88bf07d1c18521a99f47446cee8
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Extensibility Message Bus   1.1.77 (master@24013d5)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Fabric.DiagnosticEvents   1.0
Fabric Diagnostic Events

Microsoft Azure HDInsight Azure Node   2.3.7000.2
HDInsight Node under Azure Node

Microsoft Azure Hive Query Language Service   2.3.7000.2
Language service for Hive query

Microsoft Azure Service Fabric Tools for Visual Studio   2.5
Microsoft Azure Service Fabric Tools for Visual Studio

Microsoft Azure Stream Analytics Language Service   2.3.7000.2
Language service for Azure Stream Analytics

Microsoft Azure Stream Analytics Node   1.0
Azure Stream Analytics Node under Azure Node

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 0x10 - v2.9.0.0

Microsoft Continuous Delivery Tools for Visual Studio   0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager   1.0
Install client-side libraries easily to any web project

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio Tools for Containers   1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio   16.0.300 (573eda3)
Support for debugging Mono processes with Visual Studio.

Node.js Tools   1.5.10301.2 Commit Hash:9c34eb81d73db6babeb71674feb1cb437dba9f2f
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager   5.0.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

Snapshot Debugging Extension   1.0
Snapshot Debugging Visual Studio Extension Detailed Info

SQL Server Data Tools   16.0.61903.25110
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript Tools   16.0.10306.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   3.0.0-beta4-19170-01+1deafee3682da88bf07d1c18521a99f47446cee8
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 10.4 for F# 4.6   16.0.0.0.  Commit Hash: 809f41207b74a1356208f11b8fa3a15233734050.
Microsoft Visual F# Tools 10.4 for F# 4.6

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Containers   1.0
Visual Studio Tools for Containers

Visual Studio Tools for Kubernetes   1.0
Visual Studio Tools for Kubernetes

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

Xamarin   16.0.0.513 (d16-0@aebc6bdb5)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   4.17.4.413 (remotes/origin/d16-0@db42fb8b0)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates   16.1.43 (fe3ade5)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK   9.2.0.5 (HEAD/292d27fa)
Xamarin.Android Reference Assemblies and MSBuild support.
    Mono: mono/mono/2018-08-rc@5ad371dab1b
    Java.Interop: xamarin/java.interop/d16-0@c987483
    LibZipSharp: grendello/LibZipSharp/master@44de300
    LibZip: nih-at/libzip/rel-1-5-1@b95cf3f
    MXE: xamarin/mxe/xamarin@b9cbb535
    ProGuard: xamarin/proguard/master@905836d
    SQLite: xamarin/sqlite/3.26.0@325e91a
    Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-0@0a7edd6


Xamarin.iOS and Xamarin.Mac SDK   12.6.0.23 (ad57f87)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Build Logs

Example Project (If Possible)

VS bug #844539

@rolfbjarne

This comment has been minimized.

Copy link
Member

@rolfbjarne rolfbjarne commented Apr 9, 2019

I can reproduce by applying this diff to the watchOS/WatchKitCatalog sample in the ios-samples repository, and then running nuget restore:

$ nuget restore -Verbosity detailed
NuGet Version: 4.8.1.5435
Restoring NuGet packages for solution /work/ios-samples/watchOS/WatchKitCatalog/WatchKitCatalog.sln.
MSBuild auto-detection: using msbuild version '15.0' from '/Library/Frameworks/Mono.framework/Versions/5.20.1/lib/mono/msbuild/15.0/bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
MSBuild P2P timeout [ms]: 120000
/Library/Frameworks/Mono.framework/Versions/Current/Commands/msbuild "/var/folders/43/h027tm1n101cdrq2_b6n9n2m0000gn/T/NuGetScratch/ivr24jq2.oj7.nugetinputs.targets" /t:GenerateRestoreGraphFile /nologo /nr:false /v:q /p:NuGetRestoreTargets="/var/folders/43/h027tm1n101cdrq2_b6n9n2m0000gn/T/NuGetScratch/fw6308ny.cpx.nugetrestore.targets" /p:RestoreUseCustomAfterTargets="True" /p:RestoreTaskAssemblyFile="/Library/Frameworks/Mono.framework/Versions/5.20.1/lib/mono/nuget/nuget.exe" /p:RestoreSolutionDirectory="/work/ios-samples/watchOS/WatchKitCatalog/" /p:SolutionDir="/work/ios-samples/watchOS/WatchKitCatalog/" /p:SolutionName="WatchKitCatalog" /p:RestoreBuildInParallel="False" /p:RestoreUseSkipNonexistentTargets="False"

Running non-parallel restore.
Reading project file /work/ios-samples/watchOS/WatchKitCatalog/WatchKit3Extension/WatchKit3Extension.csproj.
The restore inputs for 'Watchkit2Extension' have not changed. No further actions are required to complete the restore.
Committing restore...
Assets file has not changed. Skipping assets file writing. Path: /work/ios-samples/watchOS/WatchKitCatalog/WatchKit3Extension/obj/project.assets.json
No-Op restore. The cache will not be updated. Path: /work/ios-samples/watchOS/WatchKitCatalog/WatchKit3Extension/obj/WatchKit3Extension.csproj.nuget.cache
Restore completed in 29.11 ms for /work/ios-samples/watchOS/WatchKitCatalog/WatchKit3Extension/WatchKit3Extension.csproj.
Reading project file /work/ios-samples/watchOS/WatchKitCatalog/WatchKitCatalog/WatchKitCatalog.csproj.
The restore inputs for 'WatchKitCatalog' have changed. Continuing restore.
Restoring packages for /work/ios-samples/watchOS/WatchKitCatalog/WatchKitCatalog/WatchKitCatalog.csproj...
Restoring packages for Xamarin.iOS,Version=v1.0...
Resolving conflicts for Xamarin.iOS,Version=v1.0...
Scanning packages for runtime.json files...
Restoring packages for Xamarin.iOS,Version=v1.0/win...
Resolving conflicts for Xamarin.iOS,Version=v1.0/win...
Restoring packages for Xamarin.iOS,Version=v1.0/win-x64...
Resolving conflicts for Xamarin.iOS,Version=v1.0/win-x64...
Restoring packages for Xamarin.iOS,Version=v1.0/win-x86...
Resolving conflicts for Xamarin.iOS,Version=v1.0/win-x86...
Checking compatibility of packages on Xamarin.iOS,Version=v1.0.
Checking compatibility for WatchKitCatalog 1.0.0 with Xamarin.iOS,Version=v1.0.
Checking compatibility for WatchApp3 1.0.0 with Xamarin.iOS,Version=v1.0.
Checking compatibility for Watchkit2Extension 1.0.0 with Xamarin.iOS,Version=v1.0.
NU1201: Project Watchkit2Extension is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0). Project Watchkit2Extension supports: xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0)
Incompatible projects: 1
Checking compatibility of packages on Xamarin.iOS,Version=v1.0 (win).
Checking compatibility for WatchKitCatalog 1.0.0 with Xamarin.iOS,Version=v1.0 (win).
Checking compatibility for WatchApp3 1.0.0 with Xamarin.iOS,Version=v1.0 (win).
Checking compatibility for Watchkit2Extension 1.0.0 with Xamarin.iOS,Version=v1.0 (win).
NU1201: Project Watchkit2Extension is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win. Project Watchkit2Extension supports: xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0)
Incompatible projects: 1
Checking compatibility of packages on Xamarin.iOS,Version=v1.0 (win-x64).
Checking compatibility for WatchKitCatalog 1.0.0 with Xamarin.iOS,Version=v1.0 (win-x64).
Checking compatibility for WatchApp3 1.0.0 with Xamarin.iOS,Version=v1.0 (win-x64).
Checking compatibility for Watchkit2Extension 1.0.0 with Xamarin.iOS,Version=v1.0 (win-x64).
NU1201: Project Watchkit2Extension is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win-x64. Project Watchkit2Extension supports: xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0)
Incompatible projects: 1
Checking compatibility of packages on Xamarin.iOS,Version=v1.0 (win-x86).
Checking compatibility for WatchKitCatalog 1.0.0 with Xamarin.iOS,Version=v1.0 (win-x86).
Checking compatibility for WatchApp3 1.0.0 with Xamarin.iOS,Version=v1.0 (win-x86).
Checking compatibility for Watchkit2Extension 1.0.0 with Xamarin.iOS,Version=v1.0 (win-x86).
NU1201: Project Watchkit2Extension is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win-x86. Project Watchkit2Extension supports: xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0)
Incompatible projects: 1
Committing restore...
Assets file has not changed. Skipping assets file writing. Path: /work/ios-samples/watchOS/WatchKitCatalog/WatchKitCatalog/obj/project.assets.json
Writing cache file to disk. Path: /work/ios-samples/watchOS/WatchKitCatalog/WatchKitCatalog/obj/WatchKitCatalog.csproj.nuget.cache
Restore failed in 137.77 ms for /work/ios-samples/watchOS/WatchKitCatalog/WatchKitCatalog/WatchKitCatalog.csproj.

Errors in /work/ios-samples/watchOS/WatchKitCatalog/WatchKitCatalog/WatchKitCatalog.csproj
    NU1201: Project Watchkit2Extension is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0). Project Watchkit2Extension supports: xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0)
    NU1201: Project Watchkit2Extension is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win. Project Watchkit2Extension supports: xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0)
    NU1201: Project Watchkit2Extension is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win-x64. Project Watchkit2Extension supports: xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0)
    NU1201: Project Watchkit2Extension is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win-x86. Project Watchkit2Extension supports: xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0)

NuGet Config files used:
    /Users/rolf/.config/NuGet/NuGet.Config

Feeds used:
    https://api.nuget.org/v3/index.json
@rolfbjarne rolfbjarne added bug iOS labels Apr 9, 2019
@rolfbjarne rolfbjarne added this to the Future milestone Apr 9, 2019
@ThumbGen

This comment has been minimized.

Copy link
Author

@ThumbGen ThumbGen commented Apr 9, 2019

Any workaround for now?

@rolfbjarne

This comment has been minimized.

Copy link
Member

@rolfbjarne rolfbjarne commented Apr 9, 2019

@ThumbGen no idea so far (except not using PackageReferences...)

@rolfbjarne

This comment has been minimized.

Copy link
Member

@rolfbjarne rolfbjarne commented Apr 9, 2019

@ThumbGen can you try adding <ReferenceOutputAssembly>False</ReferenceOutputAssembly> to the watch app reference in the main iOS project's csproj:

    <ProjectReference Include="..\WatchApp3\WatchApp3.csproj">
      <Project>{79EB034F-3D29-43A5-B89F-124879504771}</Project>
      <Name>WatchApp3</Name>
      <IsWatchApp>True</IsWatchApp>
      <ReferenceOutputAssembly>False</ReferenceOutputAssembly>
    </ProjectReference>

and see if that works?

@ThumbGen

This comment has been minimized.

Copy link
Author

@ThumbGen ThumbGen commented Apr 9, 2019

I had it already, does not help.

`

  <IsAppExtension>false</IsAppExtension>

  <IsWatchApp>true</IsWatchApp>

  <ReferenceOutputAssembly>false</ReferenceOutputAssembly>

`

For now I brought back the good old packages.config and everything works well again :)

@rolfbjarne

This comment has been minimized.

Copy link
Member

@rolfbjarne rolfbjarne commented Apr 10, 2019

@ThumbGen what exactly are your changes to the csprojs to switch to package references? Can you create a diff (git diff or the equivalent for your system)?

I'm using this diff for the ios-samples/watchOS/WatchKitCatalog sample, and it works fine.

@ThumbGen

This comment has been minimized.

Copy link
Author

@ThumbGen ThumbGen commented Apr 10, 2019

I have attached a diff between the original csproj (using packages.config) and what the "Right click on packages.config and choose 'Migrate packages.config to PackageReferences" did.

diff.zip

Note: for the shared .NET Standard 2.0, Android, WatchApp, WatchExtension and UWP apps the migration went well; only the iOS project had this small 'glitch'.

@rolfbjarne

This comment has been minimized.

Copy link
Member

@rolfbjarne rolfbjarne commented Apr 10, 2019

I tried to replicate something similar with the WatchKitCatalog sample, but no success, it still works (https://gist.github.com/rolfbjarne/4763fcb947bfdcc4410cdf0c30129fe5).

Can you attach your three csproj files? Maybe there's something strange in one of them.

@ThumbGen

This comment has been minimized.

Copy link
Author

@ThumbGen ThumbGen commented Apr 10, 2019

Attached all 3 projects (the iOS in both versions, with and without packages.config)
project_files.zip

@rolfbjarne

This comment has been minimized.

Copy link
Member

@rolfbjarne rolfbjarne commented Apr 10, 2019

I still can't repro any problems with nuget restore on those projects 😒, I updated the ProjectReferences to point to the new locations, and everything restored just fine. Then I removed the <ReferenceOutputAssembly>false</ReferenceOutputAssembly> from PTMate.iOS_PackageReference.ccsproj, and the problem showed up.

@ThumbGen can you run the following commands on your Mac (remember to fix the path to your solution):

nuget restore -Verbosity detailed  /path/to/mysolution.sln
mono --version
which nuget

and attach the output here?

@ThumbGen

This comment has been minimized.

Copy link
Author

@ThumbGen ThumbGen commented Apr 10, 2019

I am not using Visual Studio for Mac, I am using Visual Studio 2019 on a Windows machine (and build using a remote Mac Mini).

Could it be that this is only a VS2019/Windows problem?

@rolfbjarne

This comment has been minimized.

Copy link
Member

@rolfbjarne rolfbjarne commented Apr 10, 2019

Yes, it could be a VS2019/Windows problem (although usually msbuild/nuget problems usually occur on the Mac and not on Windows).

Can you copy your solution to your Mac and check if the nuget restore command works there? That would determine if it's a Windows problem or not.

@ThumbGen

This comment has been minimized.

Copy link
Author

@ThumbGen ThumbGen commented Apr 10, 2019

I can confirm that using the iOS project having PackageReferences, on a Mac machine, using VStudio 2019 for Mac, it builds without problems.

I have attached the "nuget restore -Verbosity detailed" results.
Mono version 5.18.1.3
Nuget: /library/Frameworks/Mono.framework/Versions/Current/Commands/nuget

file.zip

@rolfbjarne

This comment has been minimized.

Copy link
Member

@rolfbjarne rolfbjarne commented Apr 10, 2019

Great, thanks, I'll move this to my Windows colleagues then.

@SebastianKruseWago

This comment has been minimized.

Copy link

@SebastianKruseWago SebastianKruseWago commented Apr 25, 2019

I have the same issue and can confirm it is only a problem on Windows and not on macOS but it also affected VS2017. It works on the mac just fine while Windows keeps failing.

Severity	Code	Description	Project	File	Line	Suppression State
Error	NU1201	Project MyApp.iOS.Watch.WatchOSExtension is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win-x86. Project MyApp.iOS.Watch.WatchOSExtension supports: xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0)	MyApp.iOS	E:\Git\MyApp\MyApp\MyApp\MyApp.iOS\MyApp.iOS.csproj	1	
Error	NU1201	Project MyApp.iOS.Watch.WatchOSExtension is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0). Project MyApp.iOS.Watch.WatchOSExtension supports: xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0)	MyApp.iOS	E:\Git\MyApp\MyApp\MyApp\MyApp.iOS\MyApp.iOS.csproj	1	
Error	NU1201	Project MyApp.iOS.Watch.WatchOSExtension is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win-x64. Project MyApp.iOS.Watch.WatchOSExtension supports: xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0)	MyApp.iOS	E:\Git\MyApp\MyApp\MyApp\MyApp.iOS\MyApp.iOS.csproj	1	
Error	NU1201	Project MyApp.iOS.Watch.WatchOSExtension is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win. Project MyApp.iOS.Watch.WatchOSExtension supports: xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0)	MyApp.iOS	E:\Git\MyApp\MyApp\MyApp\MyApp.iOS\MyApp.iOS.csproj	1	

@Dids

This comment has been minimized.

Copy link

@Dids Dids commented Jul 31, 2019

I'm seeing this on macOS, where nuget restore fails, while Visual Studio for Mac restores and builds just fine.

@xamarin-release-manager xamarin-release-manager modified the milestones: Future, d16-3 Jul 31, 2019
@Dids

This comment has been minimized.

Copy link

@Dids Dids commented Aug 14, 2019

@rolfbjarne Any updates on this? Just a gentle reminder that this is happening on macOS as well, not just on Windows.

@rolfbjarne

This comment has been minimized.

Copy link
Member

@rolfbjarne rolfbjarne commented Aug 14, 2019

@Dids if you see this only on macOS, it could be a different issue, so could you please file a new issue with all your details + verbose build logs so that we can have a look? If you have a test solution as well that would be even better.

@Dids

This comment has been minimized.

Copy link

@Dids Dids commented Aug 14, 2019

@rolfbjarne I should be able to create a small repro and a new issue, but before doing so, I'm just wondering if this is indeed the same issue, as I've manually migrated all projects to use PackageReference?

The errors are exactly the same, and this is a large multi-platform Xamarin.Forms projects, with hundreds of dependencies per project, so I'd definitely prefer not having to rollback, for both speed and maintenance reasons. The migration made a huge impact on both.

Just a quick tl;dr version of the issue: VS4Mac builds fine, and it only throws those errors when building from the command line, which breaks Fastlane automation, CI etc.

@rolfbjarne

This comment has been minimized.

Copy link
Member

@rolfbjarne rolfbjarne commented Aug 14, 2019

@Dids if the build works fine from the IDE, but not from the command line, you should be able to compare build logs for the two and see where the difference is.

@Dids

This comment has been minimized.

Copy link

@Dids Dids commented Sep 17, 2019

@rolfbjarne Sorry for the radio silence. Digging in to the detailed logs this week, but figured I'd update on this in the mean time.

So the issue isn't with building, and everything builds fine in VS4Mac as well as with msbuild. The issue comes from NuGet, where nuget restore is what's causing the errors, and I'm not yet sure if the only reason this works in VS4Mac, is because I have the packages cached locally, and if it would break in case of a fresh install/restore.

UPDATE: Found a workaround! As the error comes from NuGet, but doesn't actually abort the package restore process, I figured I'd try to simply ignore the error, which seems to have worked.
I first ran nuget locals -clear all to remove cached packages, then switched my build process to use two steps, eg. nuget restore || true and msbuild ..., which so far seems to have worked.
Error is still there, but at least I can work around it, and I can't believe it took me this long to discover.

@xamarin-release-manager xamarin-release-manager removed this from the d16-3 milestone Oct 7, 2019
@xamarin-release-manager xamarin-release-manager added this to the d16-4 milestone Oct 7, 2019
@rolfbjarne

This comment has been minimized.

Copy link
Member

@rolfbjarne rolfbjarne commented Nov 27, 2019

See also #7477.

@rolfbjarne

This comment has been minimized.

Copy link
Member

@rolfbjarne rolfbjarne commented Nov 27, 2019

The fix is to add <ReferenceOutputAssembly>false</ReferenceOutputAssembly> to the project reference in the iOS project's csproj, so that it looks like this:

      <ProjectReference Include="thewatchapp\thewatchapp.WatchOSApp\thewatchapp.WatchOSApp.csproj">
        <IsWatchApp>true</IsWatchApp>
        <Project>{81724650-5BDE-4259-816A-2FA4F2A4E97D}</Project>
        <Name>thewatchapp.WatchOSApp</Name>
        <ReferenceOutputAssembly>false</ReferenceOutputAssembly> <!-- add this line -->
      </ProjectReference>
@rolfbjarne rolfbjarne modified the milestones: d16-4, Future Nov 27, 2019
@SebastianKruseWago

This comment has been minimized.

Copy link

@SebastianKruseWago SebastianKruseWago commented Nov 28, 2019

@rolfbjarne No it's not. It is already in my *.csproj file and still this error pops up all the time. I always have to remove the references to my iOS extension projects before I can update NuGet packages... it's so annoying...

@rolfbjarne

This comment has been minimized.

Copy link
Member

@rolfbjarne rolfbjarne commented Nov 28, 2019

@SebastianKruseWago can you show me your csproj files (all of them)?

@SebastianKruseWago

This comment has been minimized.

Copy link

@SebastianKruseWago SebastianKruseWago commented Nov 28, 2019

@rolfbjarne Sure, here it is: https://pastebin.com/8YswThyg

The watchOS App already has the flag you mentioned. I also added it temporarly for the Today Extension because both are throwing this error around but it didn't change anything for me.

@rolfbjarne

This comment has been minimized.

Copy link
Member

@rolfbjarne rolfbjarne commented Nov 28, 2019

@SebastianKruseWago can you execute the following in your solution's directory:

nuget restore -verbosity detailed

and attach the output?

@SebastianKruseWago

This comment has been minimized.

Copy link

@SebastianKruseWago SebastianKruseWago commented Nov 28, 2019

@rolfbjarne The restore is working fine just when updating the packages this causes issues (which than leads to revert of the update). Even with the error listed in the error window, I can compile and run my app just fine. Will your command generates the required output anyway?

@rolfbjarne

This comment has been minimized.

Copy link
Member

@rolfbjarne rolfbjarne commented Nov 28, 2019

@SebastianKruseWago I see above that it only happens on VS (on Windows) for you, in that case the VS team will have to look at it (they already know about this bug, and hopefully they'll have time soon to look into it).

@ThumbGen

This comment has been minimized.

Copy link
Author

@ThumbGen ThumbGen commented Dec 17, 2019

Could you provide a link to the VStudio issue? Soon will be 1 year since the issue was reported, the problem is still not solved and having the old packages.config format prevents me from installing NuGet packages (e.g. ACR.UserDialogs).

TIA

@chrisstaley

This comment has been minimized.

Copy link

@chrisstaley chrisstaley commented Dec 31, 2019

I had this issue, and the solution for me was to use a newer version of NuGet.

@AlejandroRuiz

This comment has been minimized.

Copy link

@AlejandroRuiz AlejandroRuiz commented Jan 10, 2020

I confirm by using nuget version 5.4.0 & adding the ReferenceOutputAssembly property the issue is fixed

@ThumbGen

This comment has been minimized.

Copy link
Author

@ThumbGen ThumbGen commented Jan 13, 2020

I use 5.4.0 and the ReferenceOutputAssembly property and on VStudio 2019 for Windows it still does not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.