How do I upgrade a .NET 2.0 website to 3.5? - vb.net

My website is VB.NET 2.0. I already opened a it in VS2k8 and told it not to upgrade. Now I want to upgrade, how do I trigger it? All the posts say 'just open it in 2k8 and it will prompt you'. Well I did, and it did, and I didn't want to yet. Now I cant get it to come up.

Open your project properties and choose Target Framework in the Application tab. There should be values such as ".NET Framework 3.5", ".NET Framework 2.0", etc. You can access project properties in your Solution Explorer by right-clicking on your project name and choosing Properties from the right-click menu.
If Solution Explorer isn't showing for you in Visual Studio, you can access it via the View menu > Solution Explorer.

Related

VB 2019 project settings empty

I want to store startup settings for my project. When I go to the project Properties/Settings, it's empty except for a link that says, "This project does not have a default settings file. Click here to create one." When I click the link to add one, it says "The system cannot find the file specified. (Exception from HRESULT: 0x80070002." So, how do I add a default settings file?
As mentioned in my comments, this seems to be a bug in VS and ought to be reported to Microsoft. As a temporary workaround, you can actually copy the settings files from a .NET Framework project into a .NET Core project. As far as I can tell from examining various VB and C# projects targeting .NET Framework and .NET Core, the settings files are the same in each case, so there's no issue copying between them. Here's what I did:
Added a VB WinForms app project targeting .NET Framework to the same solution.
Clicked the Show All Files button in the Solution Explorer for both projects.
Expanded the My Project node for both projects.
Dragged the Settings.settings item from the .NET Framework project to the .NET Core project.
It seemed to work as expected after that.

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 ...

version of .net framework launch not match .net framework bootstrapper project

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.

How do I install DotNetZip?

As I am pretty new to Visual Studio, this question may sound kinda dumb:
How do I install DotNetZip library? I am using Visual Studio Express 2012 for Windows Desktop.
There is no setup for DotNetZip.
Simply download the package from its site, decompress the library somewhere in your disk and set the reference from your project to the release folder appropriate for your project type. Remember to distribute the DLL with your application.
Another simple way would be to use nuget extension to install the library.
There are many ways to add DotNetZip file in your project. I have mention only two ways below:
Way 1:
1. In Visual Studio go to- Tools->NuGet Package Manager -> Package Manager Console
2. Select your project from Default Project drop-down in Package Manager Console.
3. Type Install-Package DotNetZip and press enter.
Automatically the package will be included in your project.
Note: Sometime it does not work as expected.
Way 2:
1. In Solution Explorer go to your Project, then References folder.
2. Right click on References folder -> Manage NuGet Packages.
3. On the pop up window select Online from left menu.
4. Type DotNetZip on Seach text box.
5. From loaded list click Install button.
Manage NugGet Package PopUp window

WCF - VS2005 to VS2008 Sln Conversion Problem

I have converted a VS2005 solution to VS2008 solution.
I am trying to Add a Service Reference to a project in the solution but not finding the desired option in the Right click -> Popup Menu.
I am not trying to add a Web Reference. I am trying to add a Service Reference. I am working with a WCF Client.
Check if the Project (Project-->Properties) is set to Target Framework ".NET Framework 3.0" or ".NET Framework 3.5".
Maybe it isnĀ“t changed during conversion from VS 2005 to VS 2008
Do you mean the "Add Web Reference" option, like in VS2005?
You need to right-click your project, select "Add Service Reference", then click the "Advanced" button in the bottom-left of the popup window, and then click the "Add Web Reference" button in the bottom-left of the next popup window.
From what I can tell, the project must be either a C# or VB project in order for the Add Service Reference option to be available. If you add a CLR-enabled C++ project, you'll have access to the Add Web Reference option, but not the Add Service Reference option. If the C++ project is not CLR-enabled, then neither of these options are available. Can you confirm what type of project you're using?