I had created my Silverlight solution with vs2010 and now I have converted it to vs2013 in this situation when I give service (I have used asmx service) reference in my project then it gives following errors:
Error 14 The type 'System.Windows.Navigation.NavigationEventArgs' exists in both
'c:\Users\kabir\Desktop\GM\GarmentsModel 12Apr 2013\GarmentsModel\Bin\Debug\System.Windows.Controls.Navigation.dll' and
'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v5.0\System.Windows.dll'
What is my wrong. It was my running project.
The class NavigationEventArgs is defined for Windows and for Silverlihgt. It's defined in PresentationFramework.dll.
For some reason one of your projects seams to reference both DLL's. Your server side code should only reference to the Windows dll's, your client side code (the Silverlight project) should only reference to Silverlight DLL's.
Look in which project the error is raised and check it's references.
Related
I have a C++ DLL in bin folder of my ASP MVC5 web application project. (I have copied and pasted it from the original C++ project as I was unable to add a reference) I am able to call some of the functions of the DLL(used DLLImport). I have a problem in one of the functions. This can only be solved when I will be able to step into the code of the C++ DLL. I also have the code of the C++ project (built using Cmake).
How do I reach the C++ code while debugging from my web application code. If I use F11 I should be able to reach the C++ code.
Debug a C++ DLL used in ASP MVC application
1) First, make sure that make sure that the DLL you are referring to has a PDB file or other output file in its folder.
You should open the c++ project in VS IDE and then make sure that you built it with Debug and x64 mode. If so, build it again.
Then in c# web project, use DLLImport to reference the xxx.dll in the output Debug folder which exists pdb and other whole files.
2) Second, go to Tools --> Options --> Projects and Solutions --> Web Projects --> Use the 64 bit version of IIS Express.
3) Third, if you debug a net core web project, please right-click on the project--> Properties-->Debug-->check Enable native Code Debugging.
If you debug a net framework web project, please right-click on the project--> Properties-->Web-->check Native Code.
4) Fourth, then close VS Instance, delete the bin and obj folder of the asp.net core project, then restart your web project and test again.
In addition, you can check this document Debug C# and C++ in the same debugging session.
Update 1
Due to the error, I think you should change to set IIS to x64 since you use x64 native dll. Right-click on your project-->Properties--> Web-->change IIS bitness to x64.
I am trying to create windows store build using Visual studio 17 with Universal Windows App Development tool.
When I create a build from unity, it creates a visual studio solution but finishes with a lot of errors.
When I try to build the resulting visual studio solution, it fails to generate a build.
I am attaching related settings and build outputs screenshot in sequence that I encounter them.
My unity build settings
Unity console errors on Build complete
Vs error on opening/building VS solution output
Can anybody help with this UWA tool. I am trying this for the first time.
It is because Unity .Net version and UWP .NET are not the same. They have much in common and also some differences.
For instance, you can build and import in VS. Then you have async/await available which are not in Unity.
For your case, here's an excerpt from there : https://msdn.microsoft.com/en-us/library/mt185488.aspx
"This topic displays the types in the System.Security and
System.Security.Principal namespaces that are included in .NET for UWP
apps. Note that .NET for UWP apps does not include all the members of
each type. For information about individual types, see the linked
topics. The documentation for a type indicates which members are
included in .NET for UWP apps."
I have a .net dll that requires msvcp110.dll to run. When I use my .net dll in another app the app gives dependency errors. However, when I set the output path of my app to the same folder that contains msvcp110.dll it runs.
Is there some way I can reference msvcp110.dll in my .net dll such that consumers of my dll only have to add a reference to it for their app to run?
Thanks!
For the sake of completeness this seems to be the answer:
Visual C++ 2010: Changes to MSVC runtime deployment (no more SxS with manifest)
I tried installing my dll to the GAC but to no avail - my app still complained about missing dependencies such as msvcr100.dll
o_O
As an extension on one of my earlier projects that required printing PDF files from command line, I now need to print them duplex.
Therefore I have found an open source piece of software called SumatraPDF and added a patch using Visual Studio Express 2012 that enables duplex settings in command line and compiled. This software works completely on Windows 7 64bit however on Windows Server 2003 64bit it returns an error message:
C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe is not a valid Win32 application.
I have found examples on the internet of others having this issue when compiling applications using VSE2012 and have tried to follow the advice given. This being to change the project platform to Windows XP (v110_xp) after installing VS Service Pack 3, however to do this I would have to change the project configuration type from Makefile to Application (.exe) and after testing this causes errors during compilation.
I have now also implemented #Hans advice with the same result.
If anyone can help I would be most appreciative.
Thanks.
NB - I have looked at other questions regarding this subject and did not feel any supplied me with a solution, apologies if I have overlooked it.
I am upgrading a Silverlight 4 application to Silverlight 5. I ran the application after changing the Target Silverlight Version to Silverlight 5 (Visual Studio 2010) and received the following error before the application loaded:
Unhandled Error in Silverlight Application
Code: 2110
Category: InitializeError
Message: AG_E_UNKNOWN_ERROR
I was unable to track down the issue using the visual studio debugger so I thought it might be an issue with the references. I noticed most of the core libraries were now pointing to the Silverlight/v5.0 directories in the Microsoft/Framework directories but the Toolkit libraries were not upgraded. I downloaded the May 2012 release of the toolkit and manually upgraded all those libraries but still received the error. So I created a new Silverlight 5 project and began adding the libraries incrementally. That application then threw that error when I added references to the Silverlight Toolkit. How can I solve this problem?
In the middle of writing my question I decided to try nuget to install the toolkit and the error has now been resolved. I am leaving the question because I spent a few hours working on it and there is not much information regarding error code 2110 for Silverlight. I did notice that nuget installs version 4.0.5.0 of the toolkit libraries and the May 2012 toolkit shows version 5.0.5.0 so that may be the issue.