Visual Studio project not working in Blend (reference errors) - xaml

When I open my project that uses a MahApps.Metro window in "Blend for Visual Studio" I get tons of errors. One of them is (this one probably causes all the other errors):
The name "MetroWindow" does not exist in the namespace "clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
This same project works fine in Visual Studio 2012. Additionally, all resources in Blend have a warning icon. How could I fix this?
Any help would be appreciated.

I fixed it. I changed the debug platform on all the projects in my solution to Any CPU like this:
Opened the project in both Visual Studio and Blend
Opened the Configuration Manager (drop down menu beside debug/release "Start" button)
One of the projects' debug platform was set to x86 so I clicked on <new...>
Set New Platform to Any CPU
Set Copy Settings From to <Empty>
Clicked Ok
Blend then asked me to reload the project and I clicked on Yes To All

Related

Can't run UWP release executable outside of Visual Studio 2017

I am using Visual Studio 2017 on Windows 10 with the official UWP sample code.
There is a UWP sample called basicinput that runs as a release build within the Visual Studio IDE without a problem.
My problem is:
when I attempt to run the release basicinput.exe executable by a mouse click (outside of the Visual Studio environment) I get an error saying that some DLLs names of the form vs*.dll can't be found.
I did a search for those .dlls and tried moving them to same folder as basicinput.exe, but then the application just hung.
What don't I understand?
What am I doing wrong?
As #Chuck-walbourn says, your application will appear in the Start Menu. If you want to deploy it to another computer (that doesn't have VS installed) you will need to create AppX packages using the menu item Project -> Store -> Create App Packages.... If you need more help with that. see the MSDN docs.
If you want to run your app from the command-line or from the Win+R dialog (with a simple name like foo.exe) you can create an appExecutionAlias for your application.

How can I include necessary libraries with VB.NET project?

I am reworking old VB6 apps into VB.NET with Visual Studio 2005 and when i tried to install them on Windows 10 I got following errors:
How can I include the missing libraries and carry them with the project?
Or can i somehow make a VB.NET installer with Visual Studio 2005 and it will take all dependencies with it?
It went well. I created new Setup project by using this tutorial vs 2005 setup project tutorial .
I added all the files that resided in the bin folder of my development project, plus I added adodb.dll by using the "Add Assembly" dialog window, right click on the setup project "Application Folder" node.
I also added msdatasrc.dll which is like backward compatibility library for MS Office for Windows XP. You can find download link here office xp support files
Once you these files, you can create shortucts which will open the main *.exe file when double clicked. Shortcuts for the desktop and for menu, can be added on the nodes User's Desktop and User's Menu

VS2015 EDI very slow with XAML

I'm facing performance issues when editing xaml files (views, styles, app.xaml, ...) in Visual Studio 2015.
If a xaml file is open I got a really nasty delay when typing or scrolling, even in other files. Also my CPU goes up and IntelliSense is not loaded. When I close all xaml files then everything just go back to normal performance, also in other files like .cs or .resw.
After a while I got an error that say "An exception has been encounterd. This may be caused by an extenstion". And yes, I've looked in the ActivityLog.xml file, but I couldn't figure it out. There where 2 errors, 1 with a source of "ClientRights (Client rights determined)" and 1 with "Editor or Editor Extension (System.NullReferenceException)"
I'm running Windows Version 1607 (OS Build 14393.222) and Visual Studio 2015 Update 3.
I have the feeling that it all started when I installed update 3, not quite sure if that has something to do with it, it's been a while when I've been in a xaml project (in this case UWP).
It must be something to do with the XAML designer, although I disabled it.
These are the steps I've already tried:
Disable extenstions (some couldn't be disabled)
Uninstalled Resharper
New install of vs2015 Update 3
Found on stackoverflow (Visual Studio 2015 is extremely slow):
Disable XMAL designer (Options > XAML Designer - uncheck "Enable XAML Designer")
Disable solution analysis (Options > C# > Advanced - uncheck "Enable full solution analysis")
Disable CodeLens (Options > Text Editor > All languages - uncheck "Enable CodeLens")
Clear asp.net caches
Anyone facing the same problem? Any help would be very appreciated
New install of vs2015 didn't help.
Fresh install of win10 + vs2015 did the job :-(
Lost many hours but back running!

Unable to start debugging - Visual Studio 2012

"Unable to start debugging 'C:\Windows\System32\WWAHost.exe'. The Microsoft Visual Studio Remote Debugging Monitor (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because a firewall is preventing communication to the remote computer. Please see Help for assistance on configuring remote debugging."
Searched for similar posts, but didn't found one. If duplicate just inform.
I am not trying to connect to any remote machine. Just testing on my local machine.
Is there any way to solve this issue. (I'm using Windows 8 Enterprise 64-bit, just a javascript project)
Problem solved. Installed Remote tools update from here and working fine. Thanks for responding. Closing the topic.
I had the same problem. I fixed it by changing properties/compile/target platform to x86 instead of Any CPU. It solved the problem in my case. Hope it helps.
This happened to me just now when I had a website set up in IIS for mydomain.com, and set my project's start up url (Local IIS) to mydomain.com, and then launched the project before remembering to add a record in the host files for the domain:
127.0.0.1 mydomain.com
This got me for a good hour before I remembered I never set the record. Adding the record fixed it right away.
Windows 7 x64, VS 2012
In my case, the Remote Debugging Monitor component was installed and the app was clearly configured to debug locally in settings. This was a WinForms app upgraded from VS 2008, .NET 3.5.
Turns out it was the Windows Firewall. By directly running:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe
A firewall dialog appeared where I could allow msvsmon.exe to run. After a VS 2012 re-start, debugging (locally) was fine!
Ensure you have Local Machine selected in this drop-down menu:
Windows 7 x64, VS 2012, VB.NET
I fixed it like this:-
Create a shortcut on your desktop to "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe".
Right-click shortcut and select "Properties" from the dropdown menu. Select the "Compatibity" tab, tick "Run this program as administrator" and click OK
Create a shortcut on your desktop to "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe".
Right-click shortcut and select "Properties" from the dropdown menu. Select the "Compatibity" tab, tick "Run this program as administrator" and click OK.
To start VS2012:-
Double-click the msvsmon shortcut icon (that you created above, to launch msvsmon). Wait for the "Visual Studio Remote Debugging Monitor (Administrator)" window to display before continuing ...
Double-click the "Visual Studio 2012 Professional" shortcut icon (that you created above, to launch VS2012)
In VS2012, ensure standard toolbar is visible.
In VS2012, ensure "Solution Platforms" dropdown (on standard toolbar) is visible and set to "x86".
and debug now works (for me anyway) ...
However after 15 minutes or so, debug may stop working and you may get the msvsmon error again. If that happens, simply close VS2012 and msvsmon and then start again (from "To start VS2012:-" above) ...
Myself and several other developers have been trying to look for a solution for this problem for about 3/4 hours as Visual Studio crashed then this error would occur (twice in 2 days). I then suddenly (after a lot of debugging and trying other suggestions and headbanging) I somehow realised that the file which was highlighted had changed and when I was trying to debug was not the MVC app project, once I changed it to my project's one it then worked.
Hope this helps and saves people from hours of pain!
I also got this error, I usually run sites under a named user (which is also a database user) and forgot to set the Application Pool. (parliament's answer also helped me)
For me this worked in VS2013:
Save your work, close Visual Studio then reopen your project
I encountered this error as well.
The cause of mine was that I had accidentally emptied out the following property
Properties->Debugging->WorkingDirectory
Changing it to:
inherit from parent or project defaults
Solved the issue.
If you are using Microsoft's Azure, try attaching manually the debugger:
I have outlined the steps in the following answer:
https://stackoverflow.com/a/35738995/1057052

Blend For Visual Studio 11 get an error

Installed Windows 8 Consumer Preview
Installed Visual Studio 2010 Premium
Installed Visual Studio 11 Ultimate
Everything installed without any errors.
I created a new Windows 8 Metro app using Visual Studio 11 and have no issues viewing xaml in VS 11 designer. If I view it in Blend For Visual Studio 11 a propup with error:
The project 'TestApp.csproj' could not be opened. The imported project 'C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v11\Microsoft.Windows.UI.Xaml.CSharp.Targets' was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. c:\Users\testuser\Documents\Visual Studio 11\Projects\TestApp\testApp.csproj
Also if I create a Windows Metro style project(any of the templates) in Blend For Visual Studio 11 it shows an empty solution after it's done. When I look at the directory of where it suppose to create it I only see the project files but no solution.
Has anyone else had these issues?
Now the only question is how
--Comment 1--
No, path C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml**v11**\Microsoft.Windows.UI.Xaml.CSharp.Targets doesn't exist. The path on the file system is C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml**v11.0**\Microsoft.Windows.UI.Xaml.CSharp.Targets
When I look at the project file this is what I see:
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' ">
<VisualStudioVersion>11.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
The project file seems to be telling it the correct location so I'm not sure why it's trying to look in the wrong path?
--End Of Comment 1--
Try this workaround from the known issues list:
1.3.3.35 Blend cannot create projects for Metro style apps built using HTML when Visual Studio 2010 is installed after Visual Studio 11 Beta
When Visual Studio 2010 is installed after Visual Studio 11 Beta, the
installation changes an environment variable to a variable that is
incompatible with Blend.
(emphasis added)
To resolve this issue:
To work around this issue, do the following:
Right-click Computer, and then click Properties.
Click Advanced Properties.
In the System Properties dialog box, on the Advanced tab, click Environment Variables.
Under System Variables, click New.
Under Variable name, type: VisualStudioVersion.
Under Value, type: 11.0.
Click OK.
For Windows 8, to get to the environmental variables:
Do a search for Advanced System Settings
Make sure you have Settings selected on the right hand side
Select the View advanced system settings option