I would like a means of making VB.Net projects automatically compile, possibly on load.
Background:
Several projects at work use UserControls.
I am the only one currently using SVN, with the repositories being file-based on my desktop.
I have been adding bin to the svn:ignore, as each run would change the files.
Unfortunately, when I update the copy of the project on a network share, my coworker has to rebuild the project; otherwise, the Visual Studio designer complains about missing classes.
As such, is there a way to make Visual Studio automatically compile the project on load? Or would my best bet be to set up a TortoiseSVN post-update script?
Related
I work in Visual Studio. It seems for me, that, if I change anything in imported .targets file, the new version of .targets is not reimported to main project while building it. If I reopen my project (I.e. close and open again Visual Studio) and then launch build - the new version of .targets works.
Is it possible to tell Visual Studio to import .targets at any rebuild?
I tried use "rebuild" and "clean" solution and project, without any result regarding the problem.
Re-evaluating imported files is done by the new CPS-based project systems that are used for .NET Core / .NET Standard projects.
For VS versions before VS 2019, you may also need to indicate to MSBuild that the imported targets file should also re-trigger incremental build by adding its path to $(MSBuildAllProjects) (this is no longer needed in MSBuild 16 / VS 2019):
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
But for "classic" .NET Framework / ASP.NET projects, you still need to close and re-open the solution for changes to take effect inside the IDE.
Also see this GitHub tracking issue for the legacy project system.
I'm working with some application handed over by another person in which I must document the requirements, build and deploy processes.
The problem here is that Visual Studio (2005) is throwing a lot of errors since it can't find the references for the dlls.
This obviously won't let VS build the project.
Everything works fine on the persons computer but not on mine, even though the project references the same folder where the dlls are, the bin folder.
How can I circumvent these problems and get VS to properly reference the dlls?
The following printscreen shows the references screen for the project.
My guess is that your DLL uses a more recent .NET framework than your application does.
Check the properties for your DLL source (right-click on the DLL code in the solution explorer and choose Properties). Go to Application - Target .NET framework and compare the version to the one the application itself uses (right-click on the project code). Note: under your application properties check both the settings under Application - Target .NET framework AND under Publish - Prerequisites.
For what it's worth, even after changing the .vbproj file and removing many lines about hard coded values,
I eventually checked out the project again removed all references to the given DLL and then added it using the GUI.
Lesson learned, don't try to change out one DLL for a newer version without using VB2005 GUI.
The easiest solution will probably be to transfer everything to another project. It will be incredibly time consuming to find where visual studio has left the hard coded path at.
WOOT!!!! Compile the DLL file to a lower version of the .NET framework, and it will fix the problem!!!!
The paths in the project file cannot be the same or the assemblies referenced have a different version.
It might be worth unloading your project and the editing it to inspect where it's looking and for what version.
I had the same problem with an older Visual Studio Project that I opened in Visual Studio 2008. I tried to add new references to the project and got permanent errors that the dll's cannot be found. After the migration of the Project to Visual Studio 2010 I got the following error message when I tried to add a new reference:
'mySample.dll' or one of its dependencies, requires a later version of the .NET Framework than the one specified in the project. You can change ...
After changing the projects .NET Framework to a newer version everything works fine.
Good suggestions in other answers. In my case, it was because the libraries weren't copied (downloaded) successfully: the files existed, but were 0 kB.
Did a clean, which removed all the DLL's and then VS2008 complained it couldn't find the references (Duh!!!) and wouldn't rebuild....luckily I had and old version of the dll's and replaced them in the directory AND THEN did a rebuild to replace them...all references are now OK and we're back to normal....good old VS 2008
I'm looking to upgrade a VS2008 project that's currently on TFS2008 version control, with the eventual destination of VS2012.
One thing I'm wondering is whether it would be better to upgrade the project incrementally, to VS2010 then VS2012, or just go straight from VS2008 to VS2012?
The second question relates to versioning--I would like ideally to keep continuity in the versioning, mainly to make it easier to do a diff and see what's changed in the project files etc. So should I keep the project linked while I upgrade the project? Or should I unlink, upgrade, and then relink to the main trunk?
Would it be a bad idea to branch, upgrade the project on the branch, then merge back to the trunk?
My overall plan is to make a copy of the 2008 project, compile the project, run ILDASM on it, upgrade the project, resolve all compiler errors, then go through the list of breaking changes for VB and try to track down and fix any "silent" changes, compile, run ILDASM on that, and do a diff to see what's actually changed in the CIL.
VS2012 will connect properly to TFS 2008. Just check out the files and open with VS2012. You can then do a file compare to see what has changed and check in if everything is ok. No need to go through VS2010. VS2012 files are VS2010 compatible.
I'm currently using Visual Studio 2010 to make a Visual Basic project. I'm trying to make a standard .EXE file for distribution but everytime I go to publish, I keep seeing it make a Click Once application.
Is there a way to complete and build a project in VStudio 2010 without making it as a Click-Once application?
Don't Publish it; that is what is making it a clickonce application. Just Build Solution; this will create the exe in the specified output directory (usually debug or release depending on your current Configuration.
I am using Visual Studio Ultimate. I have made a fairly long program which worked fine.
One day I find that the debug button was disabled and both the build and rebuild buttons do not work. I have tried opening the same project files in Visual Basic Express 2010 but still, the sane problem.
I don't really want to have to reinstall but I'm not even sure that that will fix the problem. Thanks in advance.
Is there a startup project? One project in the Solution Explorer should be in bold. Right-click the executable project and select "Set as StartUp Project". Additionally, open the Project Properties, Application tab, and ensure Application type is either "Windows Forms Applications" or "Console Application".
Did you try to reset the setting of your Visual Studio Ultimate?
Type: (In your visual studio command prompt)
devenv /resetsettings
Buttons disabled for just that program, or all programs?
I vaguely remember having a similar problem many years ago. Re-creating the project and solution files fixed it, I think (ie. create a new solution/project and import all the .vb files).
Another thing to check would be whether the compiled files have become read-only. Maybe VB.NET can't delete the old .EXEs
You need to build a test application. I think thats more difficult then making the application itself. In my personal opinion, your better off building the whole software in a notepad.
http://msdn.microsoft.com/en-us/library/ms182532.aspx