IronRuby references conflict with System.Linq? - linq

Using Visual Studio 2010, when I add the four IronRuby references to an existing project that uses Linq in several methods, the project won't compile due to not being able to find System.Linq all of a sudden. Does the IronRuby/.Net 4.0 Framework change the location of Linq or am I missing something?
Thanks,
Becky

Are you using the build for .NET 4.0?
The 3.0 build does have those overrides but they should be included in .NET 4.0.
http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33305

Related

How do I reference System.Windows 5.0.5 assembly (Silverlight) from .NET 4.5 library project?

I have a project written for Silverlight 5, which references Silverlight's System.Windows assembly in version 5.0.5.
Now I want to create a unit test project for it using a usual .NET 4.5 library project. When I try to add a reference to the System.Windows assembly 5.0.5 from Silverlight (using the browse dialog), Visual Studio adds the version from .NET 4.5.
Hence the version number does not match.
Why does Visual Studio behave this way?
How do I fix this?
You can reference Silverlight assemblies from a .Net project, but once you have managed to add one, you will likely have problems with dependencies on other libraries.
It will be easier on you if you to try a different approach...
I would suggest using the Silverlight Unit Test Framework to deal with testing your Silverlight code.
If that doesn't fit your need, perhaps Portable Class Libraries will.

Opening a MVC4 EF5 project created in VS 2012 in 2010

I created a project in the express edition of VS 2012, it was MVC4 using EF5 Model First with enums. I get this error when trying to run the same project now in VS 2010.
Error 1 Error 5: The element 'Schema' in namespace 'http://schemas.microsoft.com/ado/2008/09/edm' has invalid child element 'EnumType' in namespace 'http://schemas.microsoft.com/ado/2008/09/edm'. List of possible elements expected: 'Using, Association, ComplexType, EntityType, Function, EntityContainer' in namespace 'http://schemas.microsoft.com/ado/2008/09/edm' as well as any element in namespace '##other'.
It seems VS2010 does not support enums? But I have checked the EF version being used and it is still v5... so I am confused.
Any ideas?
Entity framework will reference 4.4 when you're targeting .NET 4.0 with vs 2010.
The 4.4 comes from the assembly version of EntityFramework.dll when
you install EntityFramework 5.0 into a project that targets .NET
Framework 4.0. This is merely a side effect of how the runtime loads
and binds to assemblies, and in no way reflects the version of the
product.
for more information check There is no such thing as Entity Framework 4.4
Compatibility
Some features are only available when writing an application that
targets .NET 4.5. This includes enum support, spatial data types,
table-valued functions and the performance improvements. If you are
targeting .NET 4.0 you still get all the bug fixes and other minor
improvements.
For more information check EF5 Release under compatibility section.
I hope this will help to you.

Visual Studio 2010 1 Class Library Project Compile 2 DLLs (.NET 3.5 and .NET 4.0)

I have a Visual Studio 2010 Solution with a class library project. What I want to do is compile 2 DLLs on build. I want to compile against .NET 3.5 and .NET 4.0 respectively. Something like below.
myproject\bin\debug\3.5\assembly.dll
myproject\bin\debug\4.0\assembly.dll
Is this possible?
Maybe you'can write a simple problem to execute on each build, it simply does:
make a copy of your working project file (*.csproj, *.vbproj, etc.)
edit the target info from 4.0 to 3.5 (or from 3.5 to 4.0) and update other related properties, it should be simple enough.
call msbuild.
I've used this approach before for different purpose.
The target framework is part of the application project settings that cannot depend on the configuration (unlike build settings).
I'm afraid you will have to create a separate project for each framework version.

What do the red exclamation mark icons in front of references mean in VS2010?

In Visual Studio 2010 project property pages, if I select Common Properties and Framework and References for a C++ project, I can see all the references from a project.
They usually have this icon:
Sometimes, though, some references appear as this:
I tried to google it or find any documentation about it in the msdn documentation about references, but cannot find anything related to this. Does someone know about this? Thank you very much in advance!
This happens also if you had VS2010 SP1 and then install .net 4.5. They changed the handling of this in a way that causes problem in VS2010. (.net 4.5 is installed with VS2012)
I believe it is because the referenced assembly is a different version than your target application. I receive the same thing if I reference a .net 4.0 assembly from a .net 3.5 project.

VS2008 to VS2010 project conversion

I have a component project build in VS2008 and targeting the .NET Framework 3.5. I recently downloaded the VS2010 Beta 1 to make sure this project would convert over correctly when the time comes to switch to the new IDE. This project contains references to a couple of 3rd party dlls built against version 2.0 of the framework. I changed my project to build against the 4.0 version of the framework but when I try to build the project I get a ton of errors that looks like the compiler can't recognize the class types of those 3rd party libraries similar to what is below.
"The type or namespace name 'Data' does not exist in the namespace 'Microsoft.Practices.EnterpriseLibrary' (are you missing an assembly reference?)"
I'm trying to figure out why I can't compile. From what I have read .NET 4.0 uses a different version of the CLR. How or why would that impact my ability to have access to those types? Am I going to have to
a) Get the source code and recompile in VS2010 / .NET 4.0 and then reference that assembly or
b) Wait for project authors to do "a" above and release their assemblies targeting the 4.0 CLR? or
c) Something else because perhaps my VS2010 install is borked?
I can change the project properties to target 3.5 and everything works as I expect under the 2010 IDE.
I suspect this is because .NET 4.0 uses CLR 4.0, not 2.0. EL 4.1 will have been built against CLR 2.0, so I'm not sure I'd expect it to be found without help.
Seems like a CLR versioning issue to me.
For the current time, I will recommend b) and/or just compile to v2.0/v3.5.
Any specific feature that you want to use in v4.0?
I wanted to mark this question as answered and based on the comments and my own experiences, I think that Mehrdad is correct in the comment attached to the question and that it was a VS2010 project conversion problem.

Resources