version of .net framework launch not match .net framework bootstrapper project - vb.net-2010

When I build the release project of the vb.net 2010 I just started using, I get two warnings:
the version of the .net framedwork launch condition does not match the selected .net framework bootstrapper package. Update the .net framewk launch condition to match the version of the .netfrk selected in the prerequisites dialog box.
The target version of the .net framework in the project does not match the .net framework launch condition version .net framework 4 client profile. Update the version of the .net framework launch condition to match the target version of the .net framework in the advanced compile options dialog box.
I changed the framework of the main project from client profile (which it was when I first created it) to frwk 4 because I read that crystal reports would not work with frwk 4 client profile. (is that true).
The bootstrap version Framework is for x64 and x86. I continued to look around the web and found that one can change the framework in the launch conditions of the setup project. These seem to be scattered around in numerous places which is a problem I don't recall ever having with other verions of .net. Anyway, That solved that problem, but there is still another issue associated with this.
I have changed anycpu to x86 for the main project and the secondary projects because I was having a problem with installing both msi's for crystal. Meanwhile, the other secondary projects (which were upgraded from 2008) I changed to x86 but in the configuration file, it says anycpu for these and as has been written here, cannot be changed to x86. I am not getting an error but have not yet tested whether the installation works.
I read an answer on your site to go into vbproj and change in notepad from x86 to x64 because they could not change from anycpu to x86 that way. But I don't want x64 so not sure what to do.
It seems that anyCPU would be a good selection but will that work with Crystal and do I need to attach other than the x86 msi if I do change it? Or can I leave it as is in this unclear situation.

This error is because of a mismatch. You can fix it by making either one of them match the other.
One is the "Launch Condition." The other is the "Prerequisite."
To change the Launch Condition:
right click your setup project in the Solution Explorer
click View - Launch Conditions
select the ".NET Framework" item under Launch Conditions
in the properties window, see the Version item. You can open the drop down menu to select the appropriate framework version.
To change the Prerequisite:
right click your setup project in the Solution Explorer
choose properties, a Properties Pages dialog appears
click the "Prerequisites..." button
check and uncheck framework versions as appropriate

Yet another poorly documented feature from our friends at Microsoft. With the Setup project selected there are an array of icons in the solution explorer toolbox; one of which is "Launch Condition Editor".
Select the setup project, select the "Launch Condition Editor", new window opens. Select "Launch Conditions", ".Net Framework" Look at properties, version. Select the present version, opens drop down menu, select desired framework.
Rebuild.
(Thanks to http://social.msdn.microsoft.com/Forums/windows/en-US/5167197a-12a5-473e-940a-569e92f08f37/error-the-version-of-the-net-framework-launch-condition-net-framework-4-does-not-match-the)

Okay so I ran into this issue as well. There are 3 places I found that need to match. Not 2 places. I am using VS2015 with the Add-in Setup Project available from Microsoft.
Place 1: Target Framework needs to be what you are targeting, variable X. To get to this go to the properties of your main project and select the target framework for your code.
Place 2: Right click your setup project and go to view > Launch conditions, click .Net Framework, and in the properties window select your target framework... variable X.
Place 3: Right click your setup project and go to properties > Prerequisites. This will show the pre-requisite from the program... In my case Variable X needed to match what was checked in this box.
This resulted in a successful build of the project without the warning.

Related

Upgrading a project to MVC 5

I have been looking for a solution to upgrade a current MVC 4 app that i have to use the new MVC 5 binaries. I cannot find a solution anywhere.
Anyone have any ideas?
Visual Studio 2013 will automatically upgrade a project simply by allowing the Nuget Package Manager to run Updates.
Steps:
In Visual Studio 2013, open the project and right click on the project name to open the Properties window. Change the Target Framework to at least 4.5.
Then, on the project right click on the References item, and select Manage NuGet Packages. On the right side of the window select "Updates", and underneath select "All". This should begin a search for all packages needing to be updated. When the search completes an "Update All" button will appear which if clicked, will update all packages.
Note, my project had the UpgradeMvc3ToMvc4 package. It could not upgrade this so I uninstalled it first, but allowed the dll's to remain when asked.
See https://learn.microsoft.com/en-us/aspnet/mvc/overview/releases/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2
Microsoft info.
It works for me ...

Why does one VB.net project properties list Configuration and Platform and another does not?

I just created a new VB Windows forms project using VS2010. The solution also contains a Fortran DLL project. I've set the platform to x86.
When I pull up the VB project properties it does not list the configuration or the Platform at the top of the properties dialog. This means I can't set the Compile tab Build output path differently for debug or release.
I've created several similar solutions using VS2008 and recently converted them to VS2010 and have not had this problem.
Mike
That is because you are using VS2010 Express and your single project is not in a solution project.
You could manually change the output from your .VBPROJ file with notepad. Inside that file you could do other changes . FOr exemple switching from Debug to Release. You have to restart your VS2010 Express edition to apply the changes (if I am not mistaken and it will be onkly true if you are using the Express Edition)

Where are the symbols for ASP.NET MVC 4.0 RTM?

I'm trying to configure Visual Studio 2012 to allow me to step into ASP.NET MVC 4.0 source code. (System.Web.Mvc.dll). I've followed SymbolSource's recommended configuration but when I try to load the symbols, Visual Studio can't locate them.
Recommended configuration
To configure Visual Studio for symbol/server
use, follow these instructions:
Go to Tools -> Options -> Debugger -> General.
Uncheck “Enable Just My Code (Managed only)”.
Uncheck “Enable .NET Framework source stepping”.
Yes, it is misleading, but if you don't, then Visual Studio will
ignore your custom server order (see further on).
Check “Enable source
server support”.
Uncheck “Require source files to exactly match the
original version”
Go to Tools -> Options -> Debugger -> Symbols.
Select a folder for the local symbol/source cache.
Add symbol servers
under “Symbol file (.pdb) locations”. Pay attention to the correct
order, because some servers may contain symbols for the same binaries:
with or without sources. We recommend the following setup:
http://referencesource.microsoft.com/symbols
http://srv.symbolsource.org/pdb/Public or the authenticated variant
(see above)
http://srv.symbolsource.org/pdb/MyGet or the authenticated
variant (see above) (other symbol servers with sources)
http://msdl.microsoft.com/download/symbols (other symbol servers
without sources)
I am aware that the source code is available on CodePlex, however I'm specifically interested in stepping into the code using a symbol server instead of having to unreference Mvc from the GAC and reference a locally built assembly.
Has anyone had success doing this with MVC 4.0?
Just add a symbol server that serves more then just major releases.
Try this one, contains most minor builds.
http://srv.symbolsource.org/pdb/Public
Verify:
Run VS as administrator.
Check that something have been downloaded to your symbol cache directory.
Goto select only specified modules.
Add "System.Web.Mvc.dll"
Set a break point in your code. Start debug.
When break point hits rightclick in callstack on any mvc.dll row. Verify that symbols are loaded.
if loaded, try dubbleclick on one callstack row to open mvc source.
Get back with where you get in trouble.
I will make some refinements to Luke Gumbley's anwser.
Microsoft tries to make a developer's life easier. Whenever it release an MVC version installer, there should also be a Source to download. So people can use the source to explore what is installed by the Installer, as well as to debug the MVC.
Back to the way of downloading the MVC debug info. Your Visual Studio (I use 2010) will never try to download MVC PDB files from the aforementioned servers if you have MVC4 installed on your system. In this case, your Visual Studio will use the MVC from your GAC when you run debugger.
I have tried the way suggested by Luke Gumbley. However, once you uninstall MVC, your MVC project will not be loaded, and you cannot create a new MVC project since the Template is gone. So please don't unistall MVC. If you do so, you still need to reinstall it. This wastes time.
What you really need to do is exit your Visual Studio, run command
gacutil /u System.Web.Mvc
Then go to C:\Windows\Microsoft.NET\assembly\GAC_MSIL, remove or rename the offending System.Web.Mvc folder. After this, lanuch your Visual Studio, and fetch the MVC package from NuGet.
I can't answer on your question directly and provide you URL with symbols (.pdb) for System.Web.Mvc.dll for ASP.NET MVC 4.0, but probably I can help you to solve the problem in another way.
As well known (see here for example) Microsoft provide the current source code of .NET on http://aspnetwebstack.codeplex.com/. In the post it's described how to use the Nightly version of ASP.NET (the current developer state of the code). If you didn't used Git before you can have problems with downloading RTM version of ASP.NET 4.5 (with ASP.NET MVC 4.0) which you could prefer to use instead of Nightly version. Nevertheless the downloading of the full source code of RTM version is easy enough. You need just to know that Git allows to save copy of the code in branches or tagged versions. In the way you can get access (and download it) to some previous versions of the full code. The link for example provide you jQuery 1.8.2 instead of another link get you the latest developer version which can be unstable. So to download the source code of RTM version you just need to choose "v2-rtm" branch and then click on "Download":
You can use the link to select "v2-rtm" branch directly.
I can repeat that it's not exactly what you asked and I know that compiling of ASP.NET source code could be also a little tricky, but I decided do write the information. If somebody would suggest you the better solution it would be interesting for me too.
I had exactly the same issue (correct version but no symbols), but after a day or so of trying everything I've been able to get it working. These are catch-all instructions that worked for me, they may contain unnecessary steps:
Sign up for SymbolSource and follow the VS instructions using the
authenticated URL form
Uninstall all versions of MVC with add/remove programs
Remove MVC assembly from the GAC (the question is about modifying
MVC but the GAC answer is good)
Remove and then reinstall the MVC 4 reference to your project with
NuGet
Start debugging, open the modules window, and cross your fingers
that ‘Symbols loaded’ is next to System.Web.MVC when it appears.
(sprinkle in restarts as you see fit, for me the key final step was reinstalling the NuGet reference)
My theory is that as the GAC library is used at runtime in preference to the local reference, the symbols are not found when they are searched for. By removing MVC from the GAC and then reinstalling the NuGet reference, it seems the local reference is used and the symbols are found. It's counterintuitive as the System.Web.MVC.dll files are binary-equivalent between NuGet and the GAC, although they are dated differently.
I'm not totally convinced though as I tried to do the same thing for Razor and that didn't work.
Let me start with that ReSharper provides a handy dialog to step in the code at any time:
So you get the following code screen if you drill to the source code:
But I became curious to accomplish this by hand. I started with proper pdb configuration:
After that I got the following error:
Next I copied the C:\Users\Andrew\AppData\Local\Temp\SymbolCache\MicrosoftPublicSymbols\System.Web.pdb\CA49C4332DE847FA967F58AFF370B70E1\System.Web.pdb to C:\Users\Andrew\AppData\Local\Temp\SymbolCache\System.Web.pdb (to match the lookup path). After that i encountered this:
And it turned out that the mismatching builds are only good for browsing the source, not debugging. (Current machine has VS2012 RC, hence MVC libraries are not RTM). If they match, you'll the the source.
I still don't know why doesn't the lookup path adjust to symbol configuration. Hope this helps.
I just solved this same problem.
The problem is that the dll stored in the GAC does not correspond exactly to the published pdbs on symbolsource.org. The one on symbolsource corresponds apparently to the latest version available through Nuget, and the one in the GAC must the one installed with .NET Framework 4.5. (.Net uses whatever is on the GAC before attemting to use anything local to your proyect, you can see this, when debuggin, go the Debug->Windows->Modules, there the System.Web.Mvc.dll is the one from GAC according to its path)
What I did was to include in the GAC the System.Web.Mvc.dll on the package folder of my solution, the one downloaded through Nuget. This you can do by using gacutil on a VS Command Prompt (run the VS Cmd as admin).
You can check on the same Modules Windows, right clicking on the System.Web.Mvc.dll, and then on Symbol Load Information. With the "old" GAC dll you get a message like (part of it)
SYMSRV: http://srv.symbolsource.org/pdb/Public/System.Web.Mvc.pdb/1E540B87149F4031B9CDEACAD8D771231/System.Web.Mvc.pdb not found
Notice here the subfolder 1E540B87149F4031B9CDEACAD8D771231 (yours might be different)
After replacing the GAC dll for the one recently downloaded through Nuget, the message is
SYMSRV: System.Web.Mvc.pdb from http://srv.symbolsource.org/pdb/Public: 336067 bytes
http://srv.symbolsource.org/pdb/Public: Symbols downloaded from symbol server.
C:\Users\\AppData\Local\Temp\SymbolCache\System.Web.Mvc.pdb\68B2330E48624B6C9DE05BED1C8C320F1\System.Web.Mvc.pdb: Symbols loaded.
Notice the subfolder 68B2330E48624B6C9DE05BED1C8C320F1, which is the one that is searched for in symbolsource.org is the correctly found.
Hope this helps
There's some related info here: http://aspnetwebstack.codeplex.com/discussions/399312
And here: Debug into nightly build of ASP.NET MVC4 using Symbolserver

Building C++ projects that targets framework 3.5 but produces assemblies targeting framework 4.0

Background
We have a C++ solution that has been moved from VS2005 to VS2010 where the project files were targeting the .net framework 3.5 but since moving over to VS2010, all of the project files were showing that they were targeting the.net framework 4.0. I have since changed the .vcxproj files manually so that they are targeting the .net framework 3.5, using the method described in the Community Content on this link
The Problem
When I build these project files, manually or via an automated build, the output assemblies are still targeting the .net framework 4.0. I can tell this by using various methods described here. I also know that this is the case as I build and run the installer for this application. Once the application has been installed (which then shows as a service), I try to start the service on the target machine. This service will not start on a machine without the .net framework 4.0 installed. If 4.0 is then installed, the service will start, so this is another test that I can run that shows me that the application has a dependency on .net framework 4.0 which it should not.
The Aim
Ideally, I need to build this application so that the outputs are targeting the .net framework 3.5 instead of 4.0 so that it will actually run as it is supposed to! I have tried to use the 3.5 version of MSBuild as described in one of the answers given for this question here but got the same error that is described underneath that post.
Can anyone help with this? It's proving to be a right pain and I've been banging my head against the wall for over a week trying to get this sorted!
Thanks again in advance
Make sure you follow all the instructions as provided in the first link you posted.
For example,
Make sure you have Visual Studio 2008 installed on the build server.
Make sure you also change each project's "Platform Toolset" to v90.
Verify the project's framework version: "In Solution Explorer, right-click your project and then click Properties. In the Property Pages window, in the left pane, expand Common Properties and then select Framework and References. Verify that the new Framework version appears at the top of the right pane."

Change target framework in VB.NET console app

I created a VB Console app and it defaulted to .NET 4 but I need it to be .NET 3.5. I've been looking but all the references I find say to change it on the 'Compile' tab in properties but I don't have a compile tab or anything else that lets me change the target framework.
Any ideas other than recreating the project?
Note: I'm using VS2010 Ultimate
Update: added screen shot
Are you sure you are right clicking the project, then clicking Properties? For me in the properties window there is a Compile tab on the left side (under Application), and there is an option to change the target under Advanced Compile Options....
In vs2010 you goto PROJECT ---> SLN Name properties --> COMPILE ---> ADVANCED COMPILE OPTIONS(BOTTOM). Now Reverting it to 3.5 is something that as far as I know is something you can't do, atleast not easily or advised. Obviously upgrading from say a 2.0 to a 3.5 or 4.0 framework is easy as the step's above. Your best bet is unfortunately to create a new project in the 3.5 framework.
Project/Properties/Compile/Advanced Compile Options