Click here to Skip to main content
15,889,834 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In a project that builds, I ran ReSharper > Inspect > Code Issues in Solution

It gave me three of the same warnings:

"Cannot resolve assembly 'System.Drawing'"

The "code" (markup) causing the complaint was like so:

HTML
<metadata name="mnuMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>17, 17</value>
  </metadata>


R#'s suggestion was to "Convert attribute to nested element"

I took it up on its offer, and it changed the above to:

HTML
<metadata name="mnuMain.TrayLocation">
    <type>System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a</type>
    <value>17, 17</value>
  </metadata>


When I re-run ReSharper > Inspect > Code Issues in Solution, the warning has gone away. Why? It still references the System.Drawing assembly.

It's true that the System.Drawing in my project's list of references is Version 3.5.0.0 (Runtime Version == v2.0.50727). Is that

why that R# gives that warning? But why does rearranging the xml appease it? Changing "Version=2.0.0.0" to "Version=3.5.0.0" just made matters worse. If I do that, the R# warning becomes an actual compile-time error of the same verbiage, namely, "Cannot resolve assembly 'System.Drawing'" but has no suggestions on how to fix it...???
Posted
Comments
BillWoodruff 30-Oct-14 22:07pm    
Assuming there is only one "B. Clay Shannon:" I don't have to tell you about ReSharper's support forum because you asked this question there before, and I know I don't need to tell you about the ReSharper section of StackOverFlow because you are a very frequent poster there.

Just curious if your question on the ReSharper forum was answered, and why you are asking here ... of course it's fine with me you ask here !

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900