Missing System.IO.Packaging classes in VS 2008 - c#

I have Visual Studio 2008 on my Vista 64 machine, along with .Net 3.5
I have been learning about zip files and the doco keeps referring me to this library which isits states has been available since .Net 3.0.
Why is this library missing? I bout the professional version of VS 2008 (in 2008) and am at a loss to understand why it is missing.
Thanks for any help.

You must add a reference to WindowsBase.dll in order to use System.IO.Packaging:
Right-click your project in the Solution Explorer and press Add Reference....
Go to the .NET tab and scroll down to WindowsBase.
Select it and press OK.

Related

Can't See MVC5 Project Option in VS2012 [duplicate]

I've installed Visual Studio 2013 Premium (MSDN license) on my machine. Yet, the ASP.NET Web Application template is not there (except for Version2012, which offers me MVC 4, see screenshot below):
I have uninstalled and reinstalled VS2013 three times now. I've deleted the ItemTemplatesCache and ProjectTemplatesCache folders along with running the devenv /InstallVSTemplates and devenv /Setup to no avail. I've also checked to make sure web developer tools are installed. Under the \Common7\IDE\ProjectTemplatesCache\CSharp\Web folder, I only see MVC 4 template files. Am I missing something? An extension or additional program?
Below I added a screenshot of the frameworks I have installed. Any direction or advice would be appreciated. Thank you!
Jodie.
I think that "Re-install Visual Studio from scratch" is not a solution.
I have faced with the described problem and found much faster way to fix it:
First of all, try to repair Visual Studio installation (in "Control Panel\Programs\Programs and Features" find your Visual Studio, right-click and select "Repair"). Reboot after (!).
Check if template appeared in the Visual Studio. If not, then: in the "Control Panel\Programs\Programs and Features" make sure that you have "Microsoft Web Platform Installer 4.x" installed (I have 4.6 version). If not - install it from here: http://www.microsoft.com/web/downloads/platform.aspx
Run "Web Platform Installer" (it should be here: "%ProgramFiles%\Microsoft\Web Platform Installer\WebPlatformInstaller.exe")
On the "Products" tab find the line "Microsoft ASP.NET and Web Tools 2013.1 for Visual Studio 2013" (make sure that it is not for 2012!). If line has "Add" button on the right side enabled, then click it and install the tools. Reboot PC (!) and you should have your ASP.NET project template back.
If line says "Installed", then you should repair it via "Control Panel\Programs\Programs and Features", just find "Microsoft ASP.NET and Web Tools 2013.1 -Visual Studio 2013", right-click and select "Repair"). Reboot PC (!) and you should have your ASP.NET project template back!
Cheers!
After many hours of troubleshooting, these are the steps I took to fix the issue (on Windows 7 Ultimate). I assumed it was an issue with a corrupt installation and possible problems with registry keys, so I removed any and all Microsoft development tools using the following steps:
FULL VIRUS SCAN (just to make sure this was not related to a virus or malware). I used Microsoft Security Essentials
Downloaded Microsoft FixIt to help clean up registry keys as I deleted programs. After I deleted any program or program updates, I ran this tool to verify a clean uninstall had been done
Visual Studio 2010 - Ran the Visual Studio 2010 Uninstall Utility and removed the program. Went into Control Panel > Programs > Uninstall a program > View Installed Updates and searched for 'Visual Studio 2010', then removed any updates associated with VS2010 (and ran the FixIt program after every uninstall to verify the registry keys had been wiped)
Followed this MSDN post to remove Visual Studio 2012 (paying particular attention to the 'Optional Shared Packages' and removed any and all programs under this list, again running Microsoft FixIt to verify the registry keys were wiped)
Followed this blog post from Shawn Harrison to remove all SQL server; also referenced these two MSDN posts Uninstall an Existing Instance of SQL Server (Setup) and SQL Server Files Left After Uninstall
Uninstalled Visual Studio 2013, along with all references to 'Visual Studio 2013' in programs and installed updates; used FixIt to clean up registry keys after every install
Last but not least, I removed all MVC Visual Studio-related tools, references extensions including Web Tools and Web Platform Installer
This solved my problem with missing templates :)
(I'm soooooooo grateful this was all done on an SSD, however, I think it would have taken 5x longer with an old-spinning HD)
Cheers, everyone!
Not the solution in your case, but I had a similar issue where I could not find the MVC templates. Eventually I realized that I still had .NET Framework 3.5 selected, which of course does not provide MVC... switching to .NET Framework 4.5 let me find the MVC templates again.
You already had 4.5 selected in the screenshot, but I'm just posting this here for others who might make the same mistake as I did.
Don't forget to check that "Microsoft Web Developer Tool" was actually enabled during installation see this related stackoverflow question: How do I open a csproj with ProjectTypeGuids 349c5851-65df-11da-9384-00065b846f21?
"Microsoft Web Developer Tool" that was the problem for me
Have you tried updating the gallery
Tools>Extension and updates> Templates
To get up and running you could click Version 2012 under Web and get to the stock web applications templates which will provide you upto MVC 4
For MVC 5 you can either download Visual Studio 2013 Express Web, it roughly has the same ASP.NET features at Premium on MSDN License.
Update for Studio 2013:
Make sure you install express for Windows and not express for Windows Desktop. The Desktop version does not have the Web templates.
I had a similar issue with VS 2013 Web Express Update 3. After reinstalling stuff all week its fixed. I had to uninstall VS, delete the "Microsoft Visual Studio 12.0" directory, and reinstall VS. There are other workarounds that are more precise.

Error trying to debug winforms application in visual studio 2008

I have a solution working at VS 2008. It contains lots of projects. I installed VS 2010 and it converted all projects to work in .NET Framework 4. After I've found that there is no profit to use VS 2010, I decided to move back to 2008. After that debugging is totally broken.
When I select project and select "Debug -> Start New Instance" It says me:
Error while trying to run project: Unable to start debugging.
The remote computer does not have a CLR version which is compatible with the remote debugging components. To install a compatible CLR version, see instructions in the 'Remote Component Setup' page on Visual Studio CD.
I tried to remove both VSs and install 2008, removed .NET Frameworks and installed 3.5.
I don't understand why it wants remote debugger while I'm trying just to run winforms application on local machine. The same happens for Console applications.
Appreciate any help.
Is your issue with Visual Studio or with the 4.0 Framework?
If it is with just the framework. I would change your projects Target Framework back to your former framework and continue to use VS2010.
If it is with VS2010, I would do the same thing as above before trying to run it in VS2008 again. You will probably have to edit the project files to the proper VS Version.
See this CodeProject Article for an example what needs to be done.
or better yet if you have source control just restore your Solution from there.

Good way to share demo code in Visual Studio without it depending on the version

Many of my colleagues use Visual Studio 2010 and 2008, I use 2010, 2012 and 2008.
Has anyone found a good way to share assemblies and source code without having the reader having to convert the solution to whatever flavour of Visual Studio they are using?
(I realise that frameworks need to be installed etc.)
You can create multiple solutions for each per "Visual studio version". but make sure you have compatible target framework version in your projects.
If you are only distributing a single project file you can just leave out the solution file (.sln) and only include the project (.csproj) files. Visual studio will create it's own .sln file the first time the user saves the project after opening it.
If you have multiple assemblies you need included one thing you can do is have multiple .sln files (one for 2008 and one for 2010 and newer. 2010, 2012, and 2013 can all use the same .sln file) and have them point at the same .csproj files. Just create the solution in 2008 with all of its projects, then create a new empty solution in 2010 and add all of the existing projects to the 2010 solution.
EDIT: I just found out that some types of projects are not cross version compatible. If you run in to this just create a version spcific .csproj file too and have it point at the same source files (you will need to keep the projects in sync by hand if you change project settings or add/remove any new source files)
Generally, program your solution to the lowest possible .NET framework version... Sounds like 2.0 would be right up your alley. Do this because the older versions of Visual Studio do not support the newer frameworks.
If your code can all be written using one of the Express versions, then you and your colleagues should all get VS2013 Express. All of the Express versions are free, so there's little reason not to use the latest.

Microsoft.Office.Interop.Outlook 2010 Reference in VS 2012 Using .Net 2.0

I was tying to add a Reference to Microsoft.Office.Interop.Outlook Namespace in to my web project i'm using .Net 2.0 And visual studio 2012
Question
Which one of the following is the one i should choose to work with Outlook 2010
I tried to google this and i couldn't find any thing
Or here is GAC path
C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Outlook\14.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Outlook.dll
you can browse manually to folder
C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Outlook\14.0.0.0__71e9bce111e9429c\
and consequently choose Microsoft.Office.Interop.Outlook.dll
You've chosen wrong tab in Reference Manager. Choose this tab:
Then find Microsoft.Office.Interop.Outlook library. If you have multiple choice, then look at File Version info - there's a version of Office you can work with: 12.* - 2007, 14.* - 2010, 15.* - 2012.
The best choice is 14.* but the others will mostly work too.
I also need to worry you that Microsoft suggests not to use interop on server side (link)

Is there a way to force Visual Studio 2005 to use the Framework v3.5 C# compiler?

I want to compile some code that targets .NET v3.5 in Visual Studio 2005.
I suppose I could download the 2008 Express Editions... do I need both Visual Web Developer AND C#?
No there is not. That (framework targeting) is a feature that was introduced in VS2008.
To answer your second question that depends. If this is solely a Website/Web Application then you would not need the C# Express. If this is an application/service/etc, then you would need the C# Express.
You can create a custom MSBuild script to do your builds, making sure that you use latest MSBuild tool. (You still could not build from within Visual Studio though) You are going to have all kinds of problems using VS2005 to build .NET 3.5 apps so I'd recommend against it.
Im not sure if this applies to VS2005 due to Stephen Wrightons answer but i remember that when you create a new project, to the top right of the dialog box that appears there is a drop down box to select the version of the framework you want to use.

Categories

Resources