Creating .NET Reference Assemblies directory automatically - c#

We're building a .NET 4.5 application, using VS 2012. On developer machines, where VS 2012 is installed, there are no issues. On machines where this is missing, they get an error while building the project which boils down to:
The reference assemblies for framework ".NETFramework,Version=v4.5" were not found.
I know that if I installed VS 2012 on these other machines, everything will work. I don't want to have to do that. I've tried installing a variety of things, all without any success:
.NET 4.5 SDK
.NET 4.5.1 SDK
MS Build Tools
Visual Studio 2012 SDK
Windows Software Development Kit for Windows 8.1
After picking one machine and installing VS 2012 on it, I did before and after Process Monitor snapshots during a build. The successful machine has this folder C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5, the unsuccessful machine does not.
I can copy the folder from my dev machine onto our build machines and other machines, but is there any thing I can install (short of Visual Studio), that sets this up correctly?

Visual studio 2012 does not packed with .net framework 4.5.
you can download .net framework 4.5 and install it on your machine.

Related

SAP Crystal Reports v13 runtime not installing on local computer

I am running VS professional 2015 on my Windows 10 professional, and I needed to install the Crystal Reports runtime on my computer so I can build projects with CrystalDecisions.CrystalReports.Engine and CrystalDecisions.Shared, version 13.0.2000.0.
I also currently have Crystal Reports 2008, version 12.0.0.683 installed on my computer to create reports outside VS 2015.
On our company server, there was a .msi file and a .exe file. Like an idiot, I ran the .msi file without knowing:
To integrate "SAP Crystal Reports, developer version for Microsoft Visual Studio" into VS 2010 or 2012 (SP 7 and higher) or VS 2013 (SP 9 or higher) or VS 2015 RC (SP14) - VS 2015 (fully - SP 15), you must run the Install Executable. Running the MSI will not fully integrate Crystal Reports into VS. MSI files by definition are for runtime distribution only.
So after running the .msi file and realizing my mistake, I ran the "Uninstall" option from the .msi file and checked my GAC. The CrystalDecisions has been uninstalled from my "GAC_32" and "GAC_64" folders. However, the strange part is that in my "GAC_MSIL" folder, it has the CrystalDecisions version 12.0.2000.0.
GAC_MSIL folder - but no CrystalDecisions folders in GAC_32 or GAC_64
I checked my Control Panel -> Programs -> Programs and Features and nowhere can I find "SAP Crystal Reports runtime engine for .NET Framework (64-bit)" and "SAP Crystal Reports, version for Microsoft Visual Studio", so I figured the uninstall was successful.
When I try to run the .exe file this time, I get an error saying that it cannot run the installation due to the following error:
SAP Crystal Reports runtime installation error window
So I checked EventViewer -> Windows Logs -> Application, and the error log said it was an error at installation 1603 and "Product: SAP Crystal Reports, version for Microsoft Visual Studio -- You must already have Visual Studio 2010 or Visual Studio 2012 installed to proceed with this installation."
I talked with my boss and he said he doubts I need VS 2012 and it does not make sense to have both VS 2012 and 2015 on my computer. Unfortunately, I cannot build projects using CrystalDecisions v.13 like our production server, and building the project using the CrystalDecisions v.12 on my computer will cause the project to fail if I release it to production.
I checked other questions on StackOverflow, and I saw some solutions:
Install VS 2012 - not an option unless a last resort; we have VS 2015 only - unless if installing a "community" version of VS 2012 would do the trick.
Do a system restore - one person suggested because I ran the .msi file instead of the .exe, it messed up my assembly, so doing a system restore before I ran the .msi file could fix it and allow me to install CR runtime correctly, but again, my boss says he wouldn't recommend it
Try running the CR runtime setup from the SAP website with a newer version other than v.13 for my x64 bit machine that will integrate with VS 2015 without needing VS 2012 - then the newer version of my CR runtime when I build my projects will be different from the CR runtime on the production server and there will be conflicts when I release my project on the production server.
Alter/delete my assembly files because running the .msi file screwed up my assembly cache - Really risky; I don't know the first thing about assembly files and I could mess up my computer. And would deleting manually the "CrystalDecisions" folders from my "GAC_MSIL" folder even work if the GAC_32 and GAC_64 folders do not have "CrystalDecisions"?
None of these solutions are preferable, so does anyone have any other solutions I cannot see that work?
Thank you for your patience. I could just bash my head against the desk because I ran the .msi file instead of reading the directions carefully. I feel like an idiot...
To all those who are wondering, my boss and I fixed the issue and it was incredibly simple!
It turns out that we needed some Visual Studio 2012 tools installed on the computer before running the executable. We needed to install those SDK libraries in Visual Studio 2015 before running the installation of the "CRforVS_13_0_6.exe" file.
So I went to "Control Panel" -> "Programs and Features" -> selected Visual Studio Professional 2015 and clicked the "Change" button to go to the following menu:
Installing new Visual Studio 2015 SDK Features
We checked the "Windows 8.1 and Windows Phone 8.0/8.1 Tools" and made sure "Tools and Windows SDKs" was checked.
After updating, I restarted my computer and tried to run the Crystal Reports v13 for Visual Studio .exe again.
It worked!
So it looks like my boss's doubt was incorrect; you do need some VS 2012 components to run the CR v13 installation for Visual Studio!
Putting this here for future reference!

exe is not working where VS 2012 is not installed...

i have created an exe which works only in those PC's where visual studio is installed.. not working where Visual studio is not installed ?
what is minimum requirement for an exe where visual studio is not installed ?
When you create a visual studio project, you target a specific framework version. You can check that by Solution Explorer => Right Click Project => Application > Target Framework.
This .NET framework needs to be installed on the PC for the application to work.
To run the generated EXE, you need the CLR to be installed which is shipped as part of the .NET Framework.

VS 2012 project load error, incompatible .Net version

I'm getting an error when I try to load a project in VS 2012. This project was created on the same machine and it was working fine but now it has started to complain about project target framework.
From the error message I don't understand the difference between .NETFramework,Version=v4.5 and change target to .Net Framework 4.5
When I choose to download and install .NETFramework,Version=v4.5, the installer says this version is already part of OS and need not be installed separately.
I'm working on VS 2012 on Windows 8 64 bit OS.
Any pointers will be helpful, Thanks

How to build Portable Libraries on Team Foundation Build 11 Beta?

we recently began to use Team Foundation Build Server 11 Beta with a build agent on a Windows Server 2008 R2 system without having Visual Studio installed on this system. Everything works fine.
When including new Visual Studio 11 Beta Portable Libraries in our solution, problems started.
MSBuild was not able to find included
C:\Program Files (x86)\MSBuild\Microsoft\Portable\v4.0\Microsoft.Portable.CSharp.targets
on the build agent system.
We copied the missing files from a second system but now we get a build error
".NETPortable,Version=v4.0,Profile=Profile47" not found.
How to build Portable Library on Team Foundation Build 11?
Best regards,
Björn
http://msdn.microsoft.com/en-us/library/gg597391.aspx
To install the Portable Class Library Tools on a build machine without
installing Visual Studio 2010, save the download file
(PortableLibraryTools.exe) on your computer, and run the installation
program from a Command Prompt window. Include the /buildmachine switch
on the command line.

Visual Studio 2008 compilation works; Same project compiled in 2010 doesn't

Have a project that was created in Visual Studio 2008 and deployed to a 64-bit Windows 2003 server. This application references a 32-bit Interop.ActiveDs.dll. The applications were originally compiled for 'Any CPU', however, explicitly compiling as 'x86' doesn't solve the problem. The project targets the 3.5 framework.
The server is running IIS 6.0 in 64-bit mode. When we deploy the version compiled in Visual Studio 2008, the app runs perfectly fine; all pages show up. In retrospect, this is actually surprising.
We migrated the application to Visual Studio 2010 (we did not change the targeted framework) and redeployed. Now we get a BadImageFormatException loading Interop.ActiveDs.dll. Which actually makes more sense than the 2008 version running.
To solve the problem, we set Enable32bitAppOnWin64 to true and ran aspnet_regiis.exe -i from the 32-bit folder of the 2.0 framework (as per various instructions on the web). In IIS, web service extensions, there were two versions of ASP.NET 2.0, one for 32-bit and one for 64-bit. We prohibited the 64-bit version, restarted IIS, and launched the website.
What we expected: The app to run as 32-bit, load the interop, and display
What we got: "Service Unavailable"
All other web pages that were previously working displayed the same message, as did the Visual Studio 2008 version.
The support page here describes the problem exactly, but tells us to do exactly what we did to resolve the problem (enable 32-bit mode).
We've rolled back to 64-bit mode in IIS and deployed the Visual Studio 2008 version for now, but we really need to figure out how to make this app run and load the interop (there are also 32-bit Oracle DLLs that are referenced)
Two questions:
Why does the Visual Studio 2008 version work at all??
How do we get the Visual Studio 2010 version to work? And what is 2010 doing differently that causes the issue?
Thanks in advance!
James
This can happen if you have one DLL compiled for 64-bit and another in 32-bit. Check through all of your references and look for those that do not have 64-bit versions. If you can't find 64-bit versions of your incompatible DLLs, you will need to compile in 32-bit mode.

Categories