I created a new project in visual studio proj2 and I want it to have the same assembly references as proj1, so I opened proj1.csproj and copied:
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="system" />
<Reference Include="System.Windows" />
<Reference Include="System.Core" />
<Reference Include="System.Xml" />
<Reference Include="System.Net" />
<Reference Include="System.Windows.Browser" />
</ItemGroup>
and pasted it into proj1.csproj. The problem is that my System.Windows assembly reference has an exclamation mark beside it, and when I try to click it, it says:
This project cannot be viewed in the object browser because it is unavailable or not yet built. Please ensure that the project is available and built.
And of course in my .cs file, it says that
The type or namespace ‘Windows’ does not exist in the namespace ‘System’ (are you missing an assembly reference?)
How do I get my assembly references to work?
Go to project properties and ensure you’re targeting at least Framework 3.0.