I'm trying to get the path to the final output directory where the assemblies are copied to.
For example: C:\Builds\My_Task\My_Build.DATE.BUILDNUMBER
(After a finished build, everything is located here)
Each of the macros $(OutDir) and $(TargetDir) points to a Directory called:
C:\Builds\1\WorkspaceName\My_Task\Binaries
Does such a macro that points to the first described location exists? Or how can I get that path into a macro so that I can use it in my msbuild-scripts?
So I finally got around my Problem, but I didn't found a way to get the real drop location directly into an msbuild-Skript.
I found the following question, and editing the Build-Process template works fine:
How can I get TFS 2010 to build each project to a separate directory?
Please try using the $(DropLocation) macro to point to C:\Builds\My_Task\My_Build.DATE.BUILDNUMBER and see how that works out for you.
Related
I am trying to add a subproject into Master project using VBA.
I have every project in different folder. I can't figure out how to get any kind of "relative" path to it and how to find out if project is or is not into Master project.
I tried following MS Project documentation but there is almost nothing about this.
I have got every project in different folder
FYI: standard practice is to have the master and subprojects in the same folder.
I can't figure out how to get any kind of "relative" path to it
The path to subprojects is always the full path. Project does not use relative paths.
how to find out if project is or is not into Master project
This code will list out (in the Immediate window) the full name of each of the subprojects. Compare the output list to your list of projects.
Sub ListSubprojects()
Dim s As Subproject
For Each s In ActiveProject.SubProjects
Debug.Print s.Path
Next s
End Sub
So I am currently unable to open a Form and get the following error:
System.ComponenetModel.Design.ExceptionCollection was thrown.
or:
The designer loader did not provide a root component and has not indicated why
Usually the way to solve this is to open another instance of Visual Studio with the same project, attach the debugger to the other Visual Studio and try to open the form.
However, that does not seem to be working. The debugger does not break when the error is hit, and attempting to 'Break All' at any other point does not show me the source code and just the screen saying:
Your app has entered a break state, but there is no code because all threads were executing external code (typically system or framework code).
Attempting to put break points also results in:
The breakpoint will not currently be hit. No symbols have been loaded for this document
Am I missing a setting? Incorrect Setup?
I have been battling this for half a day and thoroughly search the interwebs with no luck thus far. My designer is also fairly complex and lengthy which means trial and error is an absolute last ditch option.
First attempt to resolve:
you may have tried it already. Right click the Solution in solution explorer, click "clean solution", this deletes all the compiled and temporary files associated with a solution.
Do a rebuild of the solution and try to debug again.
Second attept to resolve:
Start debugging, as soon as you've arrived at a breakpoint or used
Debug > Break All, use Debug > Windows > Modules. You'll see a list of all the assemblies that are loaded into the process. Locate the one you want to get debug info for. Right-click it and select Symbol Load Information. You'll get a dialog that lists all the directories where it looked for the .pdb file for the assembly. Verify that list against the actual .pdb location. Make sure it doesn't find an old one.
In normal projects, the assembly and its .pdb file should always have been copied by the IDE into the same folder as your .exe. The bin\Debug folder of your project. Make sure you remove one from the GAC if you've been playing with it.
third attept to resolve:
Disable the "Just My Code" option in the Debug/General settings.
there are might be other causes to your problem, i picked them from here. you may try other solution to try resolve your issues. Fixing "The breakpoint will not currently be hit. No symbols have been loaded for this document."
I'm trying to add a folder and some files within it to a Visual Studio 2010 Express VB.NET project. I have read the answers to questions on this subject here and here. They both say "select folder, right click, and then select Add To Project".
But when I right-click in this way, no "Add to Project" option appears. Does anyone know why this is so, and what I can do about it, or alternatively another way of adding a folder to a project?
Yes, this works fine. Click on the "Show All Files". You'll see ghost images of all the files that are not included in your Solution. Right-click on the folder that you want, then click the "Include in Project" It comes right in with no problem and shows up in your Solution Explorer menu.
I found this:
Visual Studio - Add Existing Folder
Instead what you can do is hit the "Show All Files" tool strip button at the top of the solution explorer, then right click on the folder you want to add and hit "Include In Project". Pretty trivial. Its amazing how long you can use a product and not know about all of its features.
Click on File.
There you can add a new or an existing project.
Once you've added a new or existing project, you can rightclick and add projects on the solution explorer.
So there is absolutely no need to show hidden fiels etc.
I understand your problem because I also use VB.Net 10 Express, and have also used the pukka versions. You do NOT, as you are aware, have the right click add to project facility however there is a way to add an existing form/class/folder etc to a project, but you have to be prepared to dive into the .vbproj file.
Here is an example of one I added to one of my projects. First of all EXIT VB.NET
Now copy the .sln, .suo, .vbproj, .vbproj.user files somewhere else or just zip them up as a backup in case you manage to screw it all up!
Next open the .vbproj file with an editor. You could use notepad or textpad but I use and recommend scite. Anyway whatever you use it must be a plain text editor. Forgive me for stating the obvious but do NOT used Word, WordPad etc.
In the file find the section that starts
<itemgroup>
You can tell if you have the right one by the fact that the entries say
<Compile Include=
Other groups say reference include or import include and you don't want those. Within that section add the code needed to get your folder and files into the project. Here is a sample:
<Compile Include="SuperPro Extras\FGeophysicalReport.designer.vb">
<DependentUpon>FGeophysicalReport.vb</DependentUpon>
</Compile>
<Compile Include="SuperPro Extras\FGeophysicalReport.vb">
<SubType>Form</SubType>
</Compile>
Note that your FOLDER is added at the front of the file names. For each of the vb files you should add the name of the designer file and the name of the code file (as above).
Finally you need to include the resx file. You will find another ItemGroup that comtaines the embedded resource files. The resx file is added into this group in exactly the same way.
<EmbeddedResource Include="SuperPro Extras\FGeophysicalReport.resx">
<DependentUpon>FGeophysicalReport.vb</DependentUpon>
</EmbeddedResource>
Note the folder\filename on the first line and then the dependency WITHOUT and folder name.
I know this is a LONG time after the question was asked so possibly not usefull to you but I hope it helps someone else. I think I will develop a utility to do this. I have one for assembly/file numbers so this would be a useful addition.
I wanted to add a little more comprehension to this as some of the directions were not explicitly clear considering one's level of Visual Studio knowledge. Here's a quickie on how I accomplished this task (using VS2013).
Drag/drop folder you want to include in the Resources folder
(i.e. %path%\"Project Name"\"Project Name"\Resources\)
For this example, I wanted to add a folder structure named AppData.
In Solution Explorer, on Top Panel, click Show All Files then click Refresh.
Locate your folder (mine: AppData) under Resources then right-click > Include In Project.
Images for guidance:
I'm trying to write a small script that will copy a folder (named .minecraft) to a new folder (doesn't exist, but I want to create a new folder called .minecraft_backups).
The current code I have is:
My.Computer.FileSystem.CopyDirectory("%appdata%/.minecraft", "%appdata%/.minecraft_backups", True)
I get an error saying:
Could not find directory '%appdata%/.minecraft'.
I'm guessing it's because of the %appdata% shortcut. Is there any workaround to do this? The reason for this is because obviously if I don't enter %appdata% and enter the full route to the directory I need to enter the users username for the computer.
Could anyone write a tiny piece of code to do this?
Try the following to get an string representation of your environment variables.
http://msdn.microsoft.com/en-us/library/system.environment.expandenvironmentvariables.aspx
I wish to have two EXE files in my project. Say one EXE has startup form ABC.vb
and other is BCA.vb
I am not able to change the name in Build so whatever is my startup file, my exe file's name remains the same. How to change it?
A project builds to one assembly, no matter what.
What you need to do is add another project to your solution. You can do this by right clicking in the tree, and going to New... Project. Then, drag your code that you want to build separately into this new project.
After this, when you build, you will get two EXEs, or whatever the project is set to.