Missing an assembly reference Crystal Reports in Visual Studio 2010 on Windows 8 - crystal-reports

I installed Crystal Reports for VS 2010 from http://www.sdn.sap.com
When I create new Crystal Report in the CrystalReport.cs class there are few errors:
The type or namespace name 'Engine' does not exist in the namespace
'CrystalDecisions.CrystalReports' (are you missing an assembly
reference?)
I manually browsed the CrystalDecisions.CrystalReports.Engine.dll and added it to the References but still gives me the error
The same error gives me for CrystalDecisions.ReportSource
The same error gives me for CrystalDecisions.Shared
Also the CrystalDecisions.CrystalReports.Engine doesn't exist when I go to Add Reference .NET tab ..

For all those who has still this problem:
Somehow i figured out that there are problems with .NET 4, with .NET 4.5 & VS2012 they just work fine.
I haven't tried Ally's solution but that maybe is the right answer to my problems, but whatever i switched to vs2012 & 4.5 so they work just fine.
Thanks

You Must Change Version Of .Net In Project Properties. In Tab Application, Change Target framework To .Net Framework 4. I exactly had problem. In fact, initial .Net Framework When I created Project was .Net Framework 4 Client Profile. As I told, I changed to .Net framework 4.
Problem solved perfectly.

Related

Visual Studio 2012 with .NET 4 Framewrk install Entity Framework 6 tools for Visual Studio 2012

As mentioned in the title I need to modify a very old project. It uses .NET 4 Framework and connects to a local SQLite database. I used Visual Studio 2012 to avoid compatibility problems.
I cannot open the .EDMX file - I get this error:
Error 10027: The XML namespace for the conceptual model's Schema element is not supported on this project's target framework version.
I tried to install Entity Framework 6 because I read that should resolve the problem, but I'm not able to find it anywhere.
How can I fix this problem?

Can I use EF4 in VS 2012?

I wanted to follow up on a post from last year ("EF5 , Widows Forms , Dragging a chield entity from project datasource into a GridView creates only 2 columns").
I believe the problem described with EF5 is still true and the solution found (use EF4) continues to be the only reasonable answer.
Before I upgrade to VS2012, I wanted to check whether anyone knows if there is any problem using EF4 in VS 2012.
Anyone with experience on this?
VS2012 requires .NET Framework 4.5 which is an in-place update. This means that once you install the .NET Framework 4.5 it will be always used when running .NET Framework 4 or .NET Framework 4.5 apps. This also means that you will be running EF5 even if you target .NET Framework 4 in VS (targeting is only a design time thing which prevents from using APIs that were not available in the targeted .NET Framework version while at runtime the app will use the version installed on the box).
With regards to the problem you are reporting - take a look at this bug report on the EF codeplex site as it apparently contains a solution to the problem

Entity Framework Power Tools error when using Reverse Engineer Code First

I have a Sql Server 2012 database that I am trying to generate the Code First POCOs/Mappings in Visual Studio 2012 SP1 using the Reverse Engineer Code First option of EF Power Tools 2.
After setting the connection properties, the following error is generated. I have researched the web but with no luck on how to resolve this. Any help would be appreciated.
Compiling transformation: The type or namespace name
'EfTextTemplateHost' could not be found (are you missing a using
directive or an assembly reference?)
EDIT:
EF Power Tools Beta 3 shipped today and the issue should be now fixed
You will see this exception if you try using EF Power Tools after installing VS 2012 Update1. Rowan's response on EF Team blog (in the comments, towards the bottom of the page) reads:
As a workaround to this issue you can edit Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes\EF.Utility.CS.ttinclude and remove the first line (<## CleanupBehavior Processor="T4VSHost" CleanupAfterProcessingTemplate="true" #>).
The only side effect of doing this is that the EF Designer will use more virtual memory when you create and edit models. On most computers this isn't a problem.
We are working on shipping a new version of EF Power Tools which will include a fix for this problem.
EDIT:
Rowan's blog contains more details on how to manually work around the issue if you still hitting it even though you have Power Tools Beta 3 installed.
Try to use this plugin
https://skydrive.live.com/?cid=456117cf53a42144&id=456117CF53A42144%21388
(however it's not signed)
Someone complained # MSDN that Power tools is screwed (actually whole EF is a mess).
After you install this one, when VS prompts you for database information click on "Advanced" and set Persist Security Info to True.
Should work
EF still got a crapload of bugs, avoid using it for critical environments. Don't even think about EF5.

Using Moles for TDD with HttpWebRequest

I am using VS2010 with SP1 (also have VS2012 installed on the same machine). Moles 1.0
The project is using .NET 4
I added moles assembly to system.dll and get the following error on compile
Error 46 The type or namespace name 'IReadOnlyList' does not exist in the namespace 'System.Collections.Generic' (are you missing an assembly reference?) [C:\Test\obj\Debug\Moles\s\m.g.csproj] C:\Test\m.g.cs Test
IReadOnlyList .NET 4.5 as far as I know.
Anyone else got this issue?
Updated Solution
I was able to get Pex to run in VS 2010 with .Net Framework 4.5 installed. Maybe others have explained that this is the solution but my issue (being new to Moles and Pex) is that many of the explanations were vague. Thanks to the author of these posts because they got me headed in the right direction:
http://feherzsolt.wordpress.com/2013/02/13/moles-and-net-4-5/
http://www.daedtech.com/using-moles-with-the-system-assembly
So the solution is to create a new .moles file (System.moles) in the test project at the same level that Pex created the yourAssemblyUnderTest.moles file and add the following to the file.
<Moles xmlns="http://schemas.microsoft.com/moles/2010/">
<Assembly Name="System" ReflectionOnly="true" />
</Moles>
You may have to clean (or manually delete the obj folder contents) and rebuild but this solution worked for me. I also noticed that the first build would report build errors, but the errors would go away on subsequent builds.
Alternative Solution
I know this isn't THE solution but it is a (poor) workaround that allows Pex to run...plus this was too long for a comment. If anyone knows how to get PEX to run on a machine with the 4.5 .Net Framework PLEASE respond.
This was my scenario. I have a machine with the .Net Framework 4.5 and I have Visual Studio 2010 and 2012 installed. I installed Pex (en_visual_studio_2010_pex_0.94.51023.0_power_tools_x64_598803.exe) and could run Pex in a VS 2010 project that was targeting .Net Framework 4.0. I could run Pex and it identified issues...but once I promoted issues to Unit Tests the unit test project wouldn't compile because of the following build error
The type or namespace name 'IReadOnlyList' does not exist in the namespace 'System.Collections.Generic' (are you missing an assembly reference?)
After much searching, and reading that Pex or Moles was replacing 4.5 .Net Framework assemblies with 4.0 versions I decided to uninstall 4.5, install 4.0, and give it a try. Running on 4.0 works just fine and I didn't need to define Mole type filters to get it to work. Then I tried tried to upgrade to the 4.5 Framework again...but sadly I end up right back where I started with the IReadOnlyList namespace issue.

EF 4.3.1 with VS 2011

I need to know if it is possible to start using the latest version of EF (4.3.1) with VS 2011 without having to install these CTP components as stated here.
I had these components installed but I removed them and since then I can't add a new edmx file to .net 4 targeted project; it complains about missing reference to System.Data.Entity.
Do I need to re install VS 2011?
After I removed and reinstalled Visual Studio, I still couldn't get red of the error, so I used process monitor to log what Visual Studio is doing with System.Data.Entity as a path filter, turned out that Visual Studio was reading from
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\policy.4.0.system.data.entity v4.0_0.0.0.0__b77a5c561934e089\policy.4.0.system.data.entity.config
which had binding to the
System.Data.Entity.dll v 4.2.0.0
once I cleared the file VS was worked like charm.
The CTP uninstall left this out.
Yeah should work with no issues using .net 4, however theres a list of known issues when using .net 4.5. You dont need to re-install vs to get version 4.3.1 of entity framework, simply install it from the nuget package gallery and if you are using .net 4 it all seems to just work.
Issues listed when installing EF4.3.1 on .net 4.5 include those listed below.
Known Issues with Entity Framework 4.x and .NET Framework 4.5
Entity Framework 4.1 thru 4.3 included additional data annotations in the
System.ComponentModel.DataAnnotations namespace in the EntityFramework assembly.
In .NET 4.5 these annotations were moved to be part of the .NET Framework in the
System.ComponentModel.DataAnnotations.Schema namespace of the
System.ComponentModel.DataAnnotations.dll assembly. If you are using EF 4.x and targeting
.NET 4.5 this results in two data annotations with the same name in different assemblies.
Because the annotations in the .NET Framework are in a different namespace we were not
able to use type forwarding to avoid this conflict.
It is possible to use EF 4.x on .NET 4.5 but we recommend using the latest pre-release
version of EF 5. If you are not using the affected data annotations there is no impact
on your code. If you are using the data annotations in a C# project you can use the extern
modifier to ensure your code uses the annotations from EntityFramework.dll
(http://msdn.microsoft.com/en-us/library/e59b22c5(v=VS.80).aspx). If you use the new
annotations from the System.ComponentModel.DataAnnotations.dll assembly in .NET 4.5
they will not be processed by Code First.
The affected annotations are:
Column
ComplexType
DatabaseGenerated
DatabaseGeneratedOption
ForeignKey
InverseProperty
MaxLength
MinLength
NotMapped
Table