开发者

Resharper bug when referencing silverlight assembly from CLR class library

开发者 https://www.devze.com 2023-01-17 16:29 出处:网络
I\'m starting with a new application using silverlight and the first problem I have with Resharper is in my unit test project.

I'm starting with a new application using silverlight and the first problem I have with Resharper is in my unit test project.

My configuration is:

-> Resharper 5.1.1727.12

-> MyProject.Tests (CLR 4.0)

  • nunit.framework.dll (CLR 2.0)
  • moq.dll (CLR 4.0)
  • MyProject.Silverlight (Silverlight 4.0)

The test project compiles, no errors and the tests run fine in Reshaper, NUnit Gui, TestDriven.Net

The problem I have is that Resharper keeps telling me to import the System.dll version 2.0 (re开发者_Go百科d line under all silverlight assembly objects/methods like a compiler error, but the project compiles).

The complete message is:

“Module ‘System. Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e’ should be referenced.”

I believe the problem is not related to tests, but that resharper is getting lost when mixing CLR 4.0 and Silverlight 4.0 assemblies.

Is there a way to get rid of this annoying message?

Thanks,

André

EDIT: Steps to reproduce:

  1. create a silverlight 4 class library
  2. add a class Foo that extends INotifyPropertyChanged
  3. create a CLR 4 class library and reference the silverlight class library
  4. add any class and declare a Foo object as a field or whatever

The project will compile, but resharper will tell you need to import System.dll v2.0.

If you disable resharper, no error message is displayed.

EDIT2: Installed resharper 5.1.1751.8, no success :(


I have created bug request and you are welcome to monitor its status at youtrack.jetbrains.net/issue/RSRP-191461 Thank you!


Thanks for the post. Please accept out apologies for the bad experience you have had with our tools. I' m going to reproduce this ASAP and let you know about the status.

UPDATE: We have fixed this in R# 6.0 EAP builds. We are not able to backport it to R# 5.1.x

0

精彩评论

暂无评论...
验证码 换一张
取 消