I'm trying to debug an add-in for Visual Studio 2010. The add-in references another project within my solution. Upon compilation, I can see that the DLL for the referenced project is successfully built and placed in the add-in's build folder.
When I start debugging, a separate instance of Visual Studio is started, and the add-in appears on the Tools menu in Visual Studio 2010. However, when I select the command for it, I receive an error, stating that my referenced assembly could not be found.
This sounds suspciously like Visual Studio is creating a shadow copy of my plugin, and isn't copying the referenced assembly over with it. Is this the case? If it isn't, what's really going on, and how to I resolve it?
My understanding is that VS doesn't automatically load referenced assemblies from the add-in's folder. In my add-ins I subscribe to System.AppDomain.CurrentDomain.AssemblyResolve and return my assembly with System.Reflection.Assembly.LoadFrom.
Related
I am working with Unity.
While in Unity, I build my program. It's a very simple program. It's simply a cube that I placed on the screen.
I clicked build and a Visual Studios Solution was created.
I open up this solution in Visual Studios 2019 and I hit Start (there is no other option besides start).
This is what appears on my screen:
How can I get rid of the error message?
Edit:
I am trying to play with the Hololens emulator.
This post recommended not installing the tools for Unity when installing Visual Studio 2019, that’s why I fid not do so.
Edit #2:
Here is an image from my entire solution from Visual Studio 2019.
Visual Studio solutions can have multiple projects inside of them. Each project generally produces a binary: an .exe, a .dll or a .lib file. If you look at the solution explorer (which you showed in your screenshot), you'll see those projects there. One of the projects will be bolded, and that is the project that is currently set as "Startup project". This is the project that Visual Studio will try to launch when you press F5 or "Start Debugging".
The reason you're getting this error is because your "Startup Project" is configured to be "Il2CppOutputProject". This project builds a .dll, and you cannot start a .dll.
To fix this, right click on "Chapter_2" project and select "Set this project as Startup Project" option. Now starting debugging should start working.
How do I open I a Visual Studio Code folder in Visual Studio 2015?
If I open it as a "Web Site", it tries to treat the node_modules directory as part of the project's normal JavaScript files and hits an error when the path exceed the maximum path length.
But I can't open it as any other project type unless I first create a project of that type and then move all the VS Code files into that folder.
Should I be trying to open it as a web site?
Or should I create a new project and then copy the files + folders into it?
Is there any advantage to having it as a project?
If I do create a project, it makes it difficult to work together with someone who is just using VS Code?
And if I use a project, which project type should I select?
Finally folder view has arrived in VS 2017 :)
You can find more details in here.
Currently there is no way to open a folder directly with Visual Studio.
Why? Because Visual Studio and Visual Studio Code only shared their name, not the idea behind it. To extend Jenny O'Reilly answer:
Visual Studio Code is a folder oriented editor
This means VSC has the same Point-of-View to your Project as the File Explorer.
Visual Studio (not Code) is a solution oriented integrated development environment (short IDE)
Instead every Project in Visual Studio needs a *.sln Solution-File as Root Component. From this point Visual Studio looks at your Project. An example would, if you copy File in your Project Folder, they wouldn't be recognized from Visual Studio. You have to add them first to your sln File, to see them. It also allows the developer to combine multiple projects (*.csproj,..) into one single Solution to build.
This means the idea behind these two editors is completely different.
Visual Studio (not code) Project-types for Web
There are Node.js Tools for Visual Studio
This will provide Node.js built-in project templates
Visual Studio 2015 comes with TypeScript templates
Workaround 1
A workaround would be a Blank Solution in which you set up your Visual Studio Code Project.
Workaround 2
Another trick would be the answer to this question. You can open your Project Folder as a Website Project.
File -> Open Website -> File System and choose the folder
Update
As you mentioned, there will be errors because Visual Studio tries to build the solutions. For the next few readers of this response, the work around for this (as John Pankowicz writes in the comment) is:
Right-click Web Site in Solution Explorer -> Property Pages -> Build -> Uncheck "Build Web Site as part of solution"
Update 2
(Thanks to JC1001 for this update)
The next version of Visual Studio (Visual Studio "15") will support opening a folder. This is mentioned in the Visual Studio Blog.
Also like in Visual Studio Code, there will be a prompt command for opening Folders. Right now you can use this in the preview version:
devenv /command “file.openfolder FOLDER_PATH”
In the future you will be able to use:
devenv FOLDER_PATH
Opinion
Personally I wouldn't recommend Visual Studio (not code) for HTML/Website projects without server-side-development, because I don't see any features. Even the intellisense suggests to me sometimes bad HTML Code (it's not the IDE's fault).
After all web projects are still text files. You can easily control group projects like this with Version Control. Visual Studio Code even provides an integrated Git support.
Visual Studio Code does not create "project files" that you can open in Visual Studio 2015. Basically, when you open up a Node website in Visual Studio, you need to re-create the folder structure in VS2015 and create a "project file".
I haven't seen any better ways of doing this, but will be happy when we can open a folder just as easilly as we can with VSCode
I'm sure it's not the best way but..
Open an existing .sln with notepad, change the names, save as [name of your project].sln.
Open with Visual Studio.
I have .NET 3.5 web application which uses some COM dll created in VB6.
I have source code for both. Also I have pdb file for the COM dll.
I would like to load the VB6 dll code inside Visual Studio 2010 for debugging.
I am able to step into dll code from VS If I loaded the COM app in VB6 IDE.
Since I am new to VB, debugging using VB6 IDE is bit tedious for me.
So I wanted to debug the COM app code inside Visual Studio 2010.
I followed the instructions in Robgruen's Blog
The problem is VS2010 automatically creating Interop dll for the corresponding COM dll,
and It uses the Interop dll only. While debugging when I try to manually load the Symbol file for the COM dll(let's say MyComApp.dll) It fails and VS is instructing me to load Interop.MyComApp.pdb file. But I have MyComApp.pdb only.
How do I make this work?
You can not debug VB6 code in Visual Studio 2010 at any level higher than the compiled assembly code.
You can however convert your VB6 dll project to VB 2010 then use it in Visual Studio 2010.
Just drag and drop your VB6 project to Visual Studio 2010 (drag project to icon of VS 2010 then drop) and upgrade wizard will automatically convert it.
Or just use Artinsoft programs.
Good Luck! :)
Does anyone know how to add a reference to "C:\Windows\SysWOW64\mqoa30.tlb" in Visual Studio 2010 like you can in Visual Studio 2008?
If I go to Add Reference, and browse to this file: "C:\Windows\SysWOW64\mqoa30.tlb" these are the different results:
Visual Studio 2008
Added Just fine
And creates the Interop stuff
Visual Studio 2010
The error message in clear text for SEO:
Could not add a reference to C:\Windows\SysWOW64\mqoa30.tlb
Could not load file or assembly 'mqoa30.tlb' or one of its dependencies. The module was expected to contain an assembly manifest.
This file may not be a managed assembly.
Cannot add from the Add Reference Dialog and "Microsoft Messaging Queue 3.0 Type Library" is not listed already in the COM Type Libraries.
(Note: I have MSMQ installed and working fine (via NServiceBus). I am running Windows 7.)
If you know how to add the reference can you please tell me?
This is what it looks like on my version of VS2010, works fine. No clue what your screenshot might represent, some sort of add-on I guess.
I have a csproj file which references a shared MSBuild script with an <Import> directive. I have noticed that when I change the shared script, I need to close and reopen Visual Studio before it notices the change - a build within Visual Studio notices changes to the csproj file but not the shared file.
This doesn't happen when I build the project with MSBuild from the command line. Is Visual Studio caching the imported script? If so, why? And how can I turn off this behaviour which makes authoring build scripts hard / impossible using Visual Studio?
Thanks!
Instead of closing and re-opening Visual Studio have you tried, unloading and reloading the project (.csproj) which imports the shared script? You can do this from the Solution Explorer in Visual Stduio by right clicking on the loaded project and selecting unload and then on the unloaded project and picking load.
In my experience, Visual Studio 2015 behaves better than Visual Studio 2008.
VS picks up changes from imported files in most cases, at least for C# projects.
YMMV for other project types, though.
While the solution explorer doesn't reflect changes, the build uses the updated version of the import file.
So, the solution may be to use a more recent version of Visual Studio.