Getting mysterious build error after upgrading sol

2019-02-11 19:58发布

I have used windows store apps 8.0 in my project and upgraded it to be 8.1. And also upgraded Visual Studio from 2012 to 2013.

First, I got an error that cannot use the Microsoft.VCLibs Version 11.0 and 12.0. So I removed the 11.0 version.

And then I got this errors:

enter image description here

I tried to find some information on the internet, but nothing. Also when I double clicked on the error it doesn't bring me to the error's spot.

I have tried to do many things, and nothing helped, so I decided to write this post.

Can someone help me resolve this errors?

EDIT:

I am adding some more information, maybe this can lead to the problem:

enter image description here

Solved:

With the help of Hans Passant the errors have fixed. The problem was that I had this duplicate on my resource file:

enter image description here

I did it twice because one is for buttons (that has content), and one is for message dialogs on code behind.

In Visual Studio 2012 this code was working fine, but somehow, not in Visual Studio 2013.

I deleted the row of Cancel.Content and the errors disappeared and it works fine :)

7条回答
Anthone
2楼-- · 2019-02-11 20:44

I don't know if you have tried re-installing VS 2013, I was getting the same error but it was resolved when I re-installed.

查看更多
兄弟一词,经得起流年.
3楼-- · 2019-02-11 20:47

A similar error can also occur if you update a Nuget package in one project, but not in another dependent project also using the same Nuget package.

i.e. it can be a version mismatch error when referencing different versions of a dependency across two dependent projects.

查看更多
劫难
4楼-- · 2019-02-11 20:48

Here is somebody else with the same problem.

I'll just copy Caplan's guidance. Look through the .resw file(s) in your project and look for a duplicated "Cancel" resource. I should note that intentionally forcing a duplicate resource produced another message when I built the program on VS2013:

1>MakePri : error 0x80073b0f: Processing Resources with error: Duplicate Entry.
1>MakePRI : error 0xdef00532: Conflicting values for resource 'Resources/String1'

Same message from either duplicating the resource in the same .resw file and by making a copy of the .resw file and adding it to the project. So Caplan's explanation isn't exactly a slam-dunk. I'd pay attention to other projects in your solution that might also have a resource named "Cancel". A likely scenario when your solution has a dependency on VCLibs, that sounds like you are mixing C# and C++/CX.

查看更多
叛逆
5楼-- · 2019-02-11 20:51

Got this error in a UWP Xamarin.Forms project when a fellow developer referenced System.Web in a PCL that the Xamarin.Forms PCL references.

For more info: Add System.Web Reference To A Windows 10 Universal App

查看更多
我只想做你的唯一
6楼-- · 2019-02-11 20:53

I came across this MSDN URL which seemed to be pretty helpful.

2 snippets in particular you could try:

  1. You could actually have a duplicate resource entry in your project file.

  2. Your obj files could have become corrupt, you need to clear out your obj files (although I haven't seen this problem for a while in my team - it might be fixed in 2008).

  3. If you are using a custom culture, perhaps with the .Net RegisterCulture method, ensure that the culture has been registered on your computer. If you've reinstalled your OS and installed VS2008 and you can't build due to this problem it could be because you need to register your custom cultures before you build. This error seems to be thrown when msbuild cannot find the culture.

Alternatively:

enter image description here

PS - There is also a Visual Studio 2012 Update 3 available that could possibly help?

Visual Studio 2012 Update 3

I hope this helps.

查看更多
唯我独甜
7楼-- · 2019-02-11 21:05

In my case, after retargeting a working Win8 App for Win81 App, was UI string. Imho it is correct but soehow the VS2013 has some problems with it.

Locations       SomeString  
Locations.Text  SomeStringForUI 

Removing the one of them solved my problem.

查看更多
登录 后发表回答