designer crash visual studio 2010 for windows phone 7 - visual-studio-2010

I'm having all kinds of problems getting Visual Studio 2010 to work with the Windows Phone 7 templates. All I have is a default portrait view added to the project, and the designer gives me the following error:
System.IO.FileNotFoundException
Could not load file or assembly 'Microsoft.Phone, Version=7.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e' or one of its dependencies. The system cannot find the file specified.
followed by a bunch of crap that doesn't seem too helpful. If I rebuild the project and refresh the designer, it momentarily appears correctly (less than a second), and then Visual Studio crashes and tries to restart.
Anyone have any idea why this might be happening?

Well, sounds like the install didn't go well. Verify that this reference assembly is located where it is supposed to be, the default install location is c:\program files\reference assemblies\microsoft\framework\silverlight\v4.0\profile\windowsphone. Randomly retrying to reinstall might pay off but do check your machine health first, this doesn't go wrong very often. Ask questions about that at superuser.com

Related

Visual Studio IDE Error On Launch When Loading Project

I am loading my project into Visual Studio 2019 IDE. When I go into the forms designer within the IDE
Visual Studio Forms Designer has been gives me the following error:
An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch.
There is no code associated with it. All referenced DLLs haven't changed.
Has anyone else experienced this or have a work around as the Google searches I have done have given me to help. Is there a way to narrow down the error? I have also checked all the security dlls to make sure they are correct and are referenced locally to help. Maybe something to do with the CAS policy?
I have also tried on my installed versions of 2012, 2015, & 2017.
UPDATE: Updated the error above as I had the wrong error added.

The “GetDeploymentPathFromVsixManifest” task failed unexpectedly

What to do to solve "The “GetDeploymentPathFromVsixManifest” task failed unexpectedly" when trying to debug a VS extension project??
Same question was already asked multiple times with different source reasons, all for VS2017 usually for upgrading VS extensions from VS2015, and it should have been solved with VS 2019. Yet, it just popped up.
The "GetDeploymentPathFromVsixManifest" task failed unexpectedly.
System.TypeLoadException: Method 'get_JoinableTaskFactory' in type 'Microsoft.VisualStudio.Sdk.BuildTasks.ExtensionEngineHost' from assembly 'Microsoft.VisualStudio.Sdk.BuildTasks.16.0, Version=16.9.2017.12405, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' does not have an implementation.
at Microsoft.VisualStudio.Sdk.BuildTasks.ExtensionManagerUtilities.GetExtensionEngine(ISettingsManager manager, Boolean deletePendingUninstalls)
at Microsoft.VisualStudio.Sdk.BuildTasks.GetDeploymentPathFromVsixManifest.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
I have tried all the solution for the same error found on SO, so far to no avail. I am using VS 2019 Community 16.9.2, updated all packages, downgraded some to try, nothing really changes this error.
This is my first attempt on VSIX and I just downloaded an existing project from github and compiled it.
The github project is working (probably) since the extension is available on the marketplace.
Any other suggestions? Searches on this error in combination with the JoinableTaskFactory dont return exactly many results.
For me the solution was to do at least one of the following steps:
Delete the obj-folder in the project
Execute Reset the Visual Studio 2019 Experimental Instance. You can find this tool when you search it in the windows search bar.
Clean and Rebuild the project
Sometimes it helped if I did only one step and sometimes it only worked after doing all the steps.
I couldn't find out if there is a specific pattern behind, but doing all of the above steps always fixed the error for me.
Another issue where I got the same error was if there was the wrong external program selected under Project Properties -> Debug -> Start external Program. For VS2019 I need to select C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe
If I switched between Visual Studio Versions, then sometimes a different Visual Studio version was selected.
Uncheck: "Deploy VSIX content to experimental instance for debugging"
in solution properties->VSIX
Also Update installed NuGet packages.

How to resolve " 'IAsyncActionWithProgress<>' is defined in an assembly that is not referenced" in Windows UAP app

I am developing a Windows UAP app in Visual Studio Ultimate CTP 2015 (latest one available in site).
I am facing issues while using await on Functions returning IAsyncActionWithProgress<>, IAsyncAction<> , IAsyncOperation<> and IAsyncOperationWithProgress<>.
I am getting the following error
Error
CS0012
The type 'IAsyncActionWithProgress<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.
I tried adding reference to the assembly mentioned (Windows). Even though this resolved the above error, it created another error at many other places (seems like there is a repetition of some classes/API's in both the assemblies. One of the error obtained is :
Error
CS0433
The type 'Page' exists in both 'Windows.Foundation.UniversalApiContract, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' and 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.
Example of code
Windows.Storage.FileProperties.BasicProperties fileSize = await file.GetBasicPropertiesAsync();
This was working fine for a Windows Phone 8.1 app in Visual Studio 2013.
What is the change I have to make to get the same result in UAP App in Visual Studio 2015.
I had the same problem with the IAsyncAction and I have just managed to solve it, so I am going to share the (maybe not the best) solution.
First I tried repair VS, no success. Then reinstalling VS, again no success. So I went to control panel -> programs -> uninstall programs, and from there I uninstalled everything that had something to do with Visual Studio or .NET. It displayed me a couple of errors, like that some applications require this program to run, but i anyway uninstalled it (if I will need it I will install it again). After that I installed Visual Studio again, wrote the code which caused the error and, it worked, with no error.
Hope this helps you as it did help me.
Sounds to me like your migration from Windows 8.1 to Windows 10 didn't go through quite right. Andy Wigley has a video with instructions on how to migrate a Windows 8.1 project to Windows 10. His example is for Phone but also applies to desktop. Here's the video: http://www.microsoftvirtualacademy.com/training-courses/a-developers-guide-to-windows-10-preview. Go look at the section titled "Migrating 8.1 Apps to Windows 10".
To be clear, you shouldn't need to add any references to get those types working in a Windows 10 Universal App. A good starting point (on Andy also points out in his video) is to create a new black Windows 10 Universal App project and compare your project and package manifest files to it and just bring over the changes.
I think the issue is the following, you can deploy on the Windows Phone but when you try to access to specific functions of the Phone you need to add
Looks like changing Project -> Properties -> Library -> Min version from any version below 14393 to 14393 or above helps with the issue.

Visual studio redistributable & side-by-side / DependentAssembly error

(I'm running Windows7 and using Visual Studio 2010.)
I'm using ClamAV in a .NET Azure project, and I'm running into side-by-side errors whenever I run clamd.exe, either through my code or by running clamd.exe on it's own.
In Visual Studio 2010 I am getting the error:
Win32Exception was unhandled The application has failed to start
because its side-by-side configuration is incorrect. Please see the
application event log or use the command-line sxstrace.exe tool for
more detail
And in Event Viewer I get:
Activation context generation failed for
"C:\Users\pconerly\code\AntiVirus_source\WorkerRole\clamav\clamd.exe".
Dependent Assembly
Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.6195"
could not be found. Please use sxstrace.exe for detailed diagnosis.
When I searched for "8.0.50727.6195" it led me to the 2005 redist, so I downloaded it
http://www.microsoft.com/download/en/details.aspx?id=3387
After a restart I am still getting the side-by-side error. Additionally, I think that the redist installer is not completing it's install-- like it's seeing visual studio 2010 and saying "oh, that's good enough, no need for me to install". I haven't tried uninstalling 2010 and using 2005, because the rest of my Dev team is using VS 2010.
What's the deal? How can this be fixed? I'm ready to pull out my hair.
The link Timores posted is the update for Visual Studio. The actual redistributable package is this:
http://www.microsoft.com/en-us/download/details.aspx?id=26347
The version you mention is actually at found here
Microsoft Visual Studio 2005 Service Pack 1 MFC Security Update
Timores is right: the redist should be this one, which is related to this KB entry
As you can see there, msvcr80.dll has been updated to version 8.0.50727.6195.
It is the "security update" of the "SP1" of the 2005 C++ runtime..
Your exe probably requires (through an internal manifest) that specific version.
If it is not found on the system (there's a lot of places searched for) nor in the current folder (with a suitable manifest aside) it won't load the exe since it is not able to "activate the context", that is load the specific DLL required in the manifest.
I had similar issues when my system got updated (windows updates) and the newly compiled EXEs were not working with an old-versioned runtime placed on the same folder.
I had to update msvcr80.dll and its manifest (which I found deep in \windows\winsxs) to make everything work.
Context activation is a tricky matter, anyway :)
HTH

Cannot compile .NET CF project containing Design time attributes without Visual Studio?

I'm working on a .NET Compact Framework 3.5 app. I have an automated build machine that does not have Visual Studio installed, and all has been fine.
I'm trying to a a new solution containing control projects that have DesignTimeAttributes.xmta files. MsBuild on the build machine is failing with cannot find file, C:\Program Files\Microsoft Visual Studio 9.0\SDK\v3.5\Bin\genasm.exe.
I've tried manually adding this directory and it's contents from my dev box to the build machine, but now I'm getting
c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.CompactFramework.Common.targets(67,9): error : genasm.exe(1) : error There was an error reading arguments. Could not load file or assembly 'Microsoft.CompactFramework.Build.Tasks, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Done executing task "BuildAsmmeta" -- FAILED.
Before I struggle further with this, I thought I'd ask if anyone else out there has gotten a CompactFramework project with design time attributes building on a machine without Visual Studio?
Filburt: I've already installed the Windows SDK, the .NET SDK, and the CF SDK. I realize now that "all has been fine" in the original question doesn't make that clear.
None of the SDK's installed anything into the Microsoft Visual Studio 9.0 directory.
I've given up and installed VS at this point, but thanks for the answer.
You think need to install the Windows .NET Framework SDK on your build machine to obtain the tools that come with Visual Studio.
update
Since you stated you installed all SDKs you could check %ProgramFiles%\Microsoft SDKs\Windows\v6.1\Bin\SetEnv.cmd for any quirks in the PATH settings. I discovered some inconsistencies there for an x64 environment.

Resources