visual-studio-2012

Cannot change Target Framework on Several Projects From v4.0 to V4.5 or 4.5.1

怎甘沉沦 提交于 2019-12-17 19:19:27
问题 I have several projects in a large solution that won't convert to V4.5.1 (or even V4.5). Most did, but obviously I need to get all of them converted. The GUI in Visual Studio says that it did it and reloads the project, but if you go back into the properties it still says V4 and it won't compile because of dependencies that converted properly and are V4.5.1 I tried manually updating the .csproj files and it says 4.5.1 as the target framework, and I even updated the app.config/web.config to

VS2012/ Blend 5: Debugging an Exception (only) occurring in design view

戏子无情 提交于 2019-12-17 19:05:55
问题 I'm developing a Metro-style app (for Windows 8) using C# and XAML. I have set up my viewmodels to be used as design-time datacontexts, like so: xmlns:vm="using:hub.ViewModels" d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type=vm:ViewModels My app appears to work perfectly when run, but in the design views of both VS 2012 and Blend, I occasionally get this (unhelpful) error message: An Exception was thrown. TargetException: Error in the application. Stacktrace at System

Accessing Projects via DTE in C# T4 Template

浪尽此生 提交于 2019-12-17 18:56:15
问题 I'm currently trying to iterate over all of my projects (sharepoint) to get all feature guids into an file. there i want to prefix them with the projects name. My problem is DTE.Solution.Item and DTE.Solution.Projects.Item (or the enumerators for foreach) will not take an integer as parameter and foreach returns an object which is not castable to Project. Here is my code snippet: var hostServiceProvider = (IServiceProvider) Host; var dte = (DTE) hostServiceProvider.GetService(typeof(DTE));

Error starting Visual Studio 2012

假如想象 提交于 2019-12-17 18:48:19
问题 I'm getting an error message every time I start Visual Studio. Since I'm also seeing some unexplained behavior in my project, I'd like to resolve this issue. Error Message An exception has been encountered. This may be caused by an extension. You can get more information by examining the file 'C:\Users\Jonathan\AppData\Roaming\Microsoft\VisualStudio\11.0\ActivityLog.xml'. When I look at the log file, I find two exceptions: Error 1 Exception Type : System.Windows.Markup.XamlParseException

Installed .Net 4.5 but can't use ZipFile class in Visual C#

不羁岁月 提交于 2019-12-17 18:46:32
问题 I'm kind of a newbie to Visual Studio programming. I recently upgraded .Net 4.0 to 4.5 in order to use the ZipFile class under System.IO.Compression, but after the installation completed, Visual Studio (I'm using 2012) still cannot recognize ZipFile as a class name. I've made sure that .Net 4.5 appears in Control Panel programs list and my C# solution sets .Net Framework 4 as the target framework. Could someone help me figure this out? 回答1: See ZipFile Class on MSDN. It shows the required

Update target button is disabled after schema comparison

两盒软妹~` 提交于 2019-12-17 18:46:24
问题 I have created database project using VS 2012. Once the schema comparison is done, the update target button should be enabled to sync with target. But it's not getting enabled. Any help plz. I'm using VS 2012 with sp 3, SQL Server 2012, 回答1: Check in Error List if you have any error, I have a non recognized word in VS (but it does in SQL Server), I commented it out, re-compared and it was enabled successfully. 回答2: See if you have a "warning" message stating "Cannot generate deployment plan

WebClient class doesn't exist in Windows 8

这一生的挚爱 提交于 2019-12-17 18:37:44
问题 I want to use a HTTP webservice, and I've already developed an app for wp7. I use the WebClient class, but I can not use it for windows 8 ("error: type or namespace can not be found"). What else can I use? Can you provide me a sample of code? Does Microsoft have a site to help when a namespace don't exist? 回答1: Option 1 : HttpClient if you don't need deterministic progress notification this is what you want use. Example. public async Task<string> MakeWebRequest() { HttpClient http = new

CMake and MsVS-NuGet

不打扰是莪最后的温柔 提交于 2019-12-17 18:26:08
问题 This question was migrated from Software Engineering Stack Exchange because it can be answered on Stack Overflow. Migrated 6 years ago . I'm currently developing a desktop application, using the C++ REST SDK (codename Casablanca), Qt5 and some other libraries. For the project setup, I use CMake. How to get CMake to install NuGet Packages? I now have to install it each time manually, if I rerun CMake, which isn't really an option. 回答1: EDIT : As of CMake 3.15, CMake supports referencing Nuget

How to build with v90 platform toolset in VS2012 without VS2008, using Windows SDK?

落花浮王杯 提交于 2019-12-17 18:20:51
问题 I use Visual Studio 2012 and this is the only version of Visual Studio I have installed. I need to build certain C++ projects with the v90 platform toolset (of Visual Studio 2008), but I can't install Visual Studio 2008. I understand it is possible to use the v90 platform toolset by installing Windows SDK 7.0. How exactly is it done? If I simply use the web installer of 7.0 SP1, I still don't see v90 as one of the possible platform toolsets. 回答1: It is possible, but apparently requires some

Could not find type 'xxx.xxx.xxx'. Please make sure that the assembly

假如想象 提交于 2019-12-17 17:47:12
问题 I've searched StackOverflow and found similar problems when I try and open a form that references a UserControl in a different project. I get the To prevent possible data loss before loading the designer, the following errors must be resolved: message relating to the following two errors: Could not find type 'MyNamespace.CommonUi.InformationBox'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the