w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to add files in solution explorer of visual studio?
This should do public String SolutionPath() { return Path.GetDirectoryName(_applicationObject.Solution.FullName); } Gotten from: Visual studio addin - finding current solution folder path

Categories : C#

Visual Studio 2012 Custom Solution Explorer Filter
The Funnel extension may be what you're looking for: Decrease solution loading and re-compilation times dramatically by filtering projects not relevant for the current task. The extension loads just the projects defined in filters (load filters must be defined before using them).

Categories : Visual Studio 2012

Visual Studio 2008: Added Project not showing up in Solution Explorer
I imagine that this is because the files don't exist. Have you created the project on a network drive somewhere? Have you renamed or moved the folder after adding it to the solution? Check the paths are right, then double check. Also check your version control to ensure someone hasn't wiped out your changes and left the .sln file intact. You can edit the .sln directly I suspect to double-check the exact path it's looking for. Verify that path exists too. Make sure the project you added was created in the same version of Visual Studio too.

Categories : C#

Is it possible to do the "right-click, add, new-item" process in Visual Studio 2012's solution explorer, exclusively through code?
Try using Dynamic compiling and another article.

Categories : C#

Open a Visual Studio Solution with a Visual Studio Add-in
You should use the ExecuteCommand to execute the standard File.OpenProject command. Similar to using the File>Open>Solution. Something like this will do in C#: string path = @"C:UsersxyzDocumentsVisual Studio 2010ProjectsMyAddin1MyAddin1.sln"; path = """ + path + """; _applicationObject.ExecuteCommand("File.OpenProject", path); Which translates to VB.NET: Dim path As String path = """C:UsersxyzDocumentsVisual Studio 2010ProjectsMyAddin1MyAddin1.sln""" DTE.ExecuteCommand("File.OpenProject", path) If you would like to know whether the command has finished, you should create an eventhandler for the command.

Categories : Vb.Net

Visual Studio Solution
A lot of files can exist in folders and subfolders under the solution (sln file). not all of these files are required to participate in projects. each project file (vbproj / csproj) maintains the inventory of files included in the project. you need to both place your files at appropriate places and update the vbproj file appropriately. As it happens, the vbproj files are not simple indexes, they are full blown build scripts. they have a pretty intricate file format (XML) and a convoluted semantics. Appending nodes in that file works fine if you follow the existing pattern. but i suggest you look up MSBUILD first. Please note that if the project you are mutating programmatically, is open in visual studio, then there are strong chances of inconsistency. make sure the project is not open in

Categories : Vb.Net

Visual studio solution constants
I don't know how you managed to get the absolute paths, if you just add files or projects they are relative. Also you can edit the file and write there whatever you see fit. In project settings you have a ton of macros, including all kinds of paths that you can use as prefix. Also projects include a user-specific .props file from the local user account, you can define installation/machine-specific properties there, if the stock macros are not enough. Look here and here for more details. For your code question $(SolutionPath) is the prefix.

Categories : Visual Studio

Visual Studio SVN project without a Solution?
When you create a solution and add a Website project to it, you should be able to let Visual Studio work on a folder structure. Just don't check in the project file, nor the solution and you should have basic editing functionality.

Categories : Svn

Visual Studio Test Explorer window will not open
As a brutal fix I actually decided to reset all VS settings (not ideal as you lose all your custom settings like formatting and debugging preferences!). To do this open up a cmd line and cd to the VS directory (mine was C:Program Files (x86)Microsoft Visual Studio 11.0Common7IDE) and type: devenv.exe /ResetSettings Hope this helps someone in the future...

Categories : Visual Studio

How to add folder relative to visual studio solution?
You can take a look at this Also, you might want select "Copy if newer" under the "Properties->Copy to Output Directory" for the file you want to include. This will ensure that the file will get copied over to the output directory.

Categories : Visual Studio 2010

Visual Studio Shortcut for building all T4 in solution
I'm assuming it's somehow disappeared from the Build menu. Right-click a toolbar or the menu bar and go to Customize. Choose the Commands tab Select Menu bar = "Build" Press "Add Command" Under Category "Build" you should see "Transform all T4 Templates" Click ok to add it back to the build menu [Optional] Move it up or down to where you want Click close The command should also be on the Build toolbar - you may need to do Add Or Remove Buttons or Customize to get it to come back. You can follow the same steps as above but instead choose Toolbar = "Build" in step 3.

Categories : Visual Studio 2012

Visual Studio solution file - what does the "Build.0" mean?
Yes, your hunch was right. It does mean that the project is ticket to build under the build configuration. I just tested this by opening the solution in one instance of Visual Studio and the .sln file in the text editor (open with) of another Visual Studio instance. If you change the configuration options in the first and save all, you will see the appropriate changes in the second.

Categories : Visual Studio 2010

Get Visual Studio Solution Files and Folders
This is gonna be very simple. Yes you can get the path of the project's solution file and can process the file inside it. string solutionPath = Directory.GetParent(Environment.CurrentDirectory).Parent.FullName;

Categories : C#

How to build a visual studio 2010 solution into a standalone dll?
There's may be a catch, but being in VS2010, you should just click on the startup project, select 'properties' -> 'configuration properties' -> 'general' -> 'configuration type' -> set it to 'dynamic library (dll)'

Categories : C#

Solution to too many lines for textbox to handle (Visual Studio)?
That is a bad design idea!! In the user perspective way he will never be able to handle the 1 million lines of text. If not, take this example: If he takes 20 seconds per line he will need about 5555.55 hours to read them all, aprox. 3.5 Years (considering 8 h/day on a 200 day year). Imaginge also a scrollbar for 1 million lines: in a 800 pixel height, 1 pixes scrollbar move will scroll 1.250 lines of text. Now, the technical part, if you put 1.000.000 lines in a text box, if you consider that in average each line has 40 characters ( that's about 40.000.000 in ASCII and 80.000.000 in UTF-16), in rough terms and in the best case scenario about 40 GB of memory just for the string. General idea: Don't do that! If you user requires to navigate in any of those million records, think about so

Categories : C#

Filter source files in solution in visual studio
U can take help of this: This tool is good. http://slntools.codeplex.com/ or follow these links: http://www.wholetomato.com/products/features/fis.asp http://www.schwammysays.net/visual-studio-2012-tip-solution-explorer-filters/

Categories : Visual Studio

Reference between different projects in the same solution (Visual Studio 2012)
Your linker error indicates that your SOCK_Stream class is not tagged with the correct dllimport/dllexport macros. There are many ways of fixing the issue. This is just a basic way 1) In your SOCK_Stream class header add the macros: #ifdef BUILDING_SOCK_STREAM #define SOCK_STREAM_DLL __declspec(dllexport) #else #define SOCK_STREAM_DLL __declspec(dllimport) #endif 2) Tag your SOCK_Stream class with the SOCK_STREAM_DLL macro class SOCK_STREAM_DLL SOCK_Stream { ... }; 3) Define the BUILDING_SOCK_STREAM symbol in your WrapperFacade project (Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions) The goal is to get WrapperFacade to export the symbols that you want to link against from your Server project. By not defining BUILDING_SOCK_STREAM in Server,

Categories : C++

Create Solution/Project programmatically without Visual Studio
I think generating the solution is a little extreme. The solution file structure hasn't changed much since 2005 http://msdn.microsoft.com/en-us/library/bb165951(v=VS.80).aspx, and there are a few projects trying to automate their generation, like Premake https://bitbucket.org/premake. However, the kind of scenario you describe, might be I believe (better?) adressed with t4 templates http://msdn.microsoft.com/en-us/library/vstudio/bb126445.aspx, or only project file generation.

Categories : C#

Why does it take sooo long to load my solution in Visual Studio?
I found a solution myself and I wanted to share it here, hoping that it might save someone quite a few hours of research and staring at the "Preparing solution..." dialog. When inspecting the devenv.exe process with Process Monitor, I found out that it is pretty busy with accessing the .svn directory. Here is what I did (and this somehow solved the problem): Kill Visual Studio Open Visual Studio without loading a solution Disable AnkhSvn as Source Control plugin (Tools->Options->Source Control->Plug-in Selection->None) Disable "Document Well 2010 Plus" (VS2010) or "Custom Document Well" (VS2012) in Productivity Power Tools (Tools->Options->Productivity Power Tools) - I read that somewhere and it might have helped as well... Close Visual Studio Delete the solution's *.suo file. This is l

Categories : Visual Studio 2010

Adding new .cshtml view to Visual Studio solution
Based on your comment @Keven your trying to evaluate to the file but with Mvc your getting extensionless urls. That isn't technically a simple html page. It's a razor view that when data is applied to generates your output which is html. I'm guessing your route.config looks something like this: public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); } } This is saying that your expecting your urls to look like http://localhost:[port]/[controller name]/[action name] or in the case

Categories : HTML

How to add farm solution without using Visual Studio, PowerShell or Stsadm
Basically, it sounds like you need to add and deploy a farm solution only using central admin? I don't think that is possible. If you look step one from MSDN Adding: A solution package is added by a farm administrator to the farm's solution store, which is in the farm's configuration database. This is done either with the SharePoint Management Shell (or with the object model). It cannot be done in Central Administration.

Categories : Sharepoint

Build options in a visual studio solution with many projects
It turns out that you must include all referenced projects as projects in the solution of the build job. Then the build configuration of the build is applied to all projects. When you do not inlcude all referenced projects as projects in the solution, the build server will build all referenced projects in debug configuration.

Categories : Visual Studio 2012

Visual Studio 2012 Server Explorer DefaultView view error?
So basically we had some folder redirection sync issues backing up appdata and basically had to take off the permissions and kill the profile before signing back in. In other words if you happen to run into this in my scenario of config'ing a new machine while still trying to work on the original and you're logging in as the same user and your appdata is syncing, your paths may not match. Problem solved, but took some figuring to realize the issue.

Categories : Sql Server

Upgrade Visual Studio solution and project files programmatically
Let me present you a different view than the 2 you presented. The fact that an upgrade is slow is that all kinds of checks are performed on the projects/solutions that you attempt to upgrade. An 'Upgrade Report' is generated to provide feedback on those checks. This is information that should not be ignored since it provides remedies on the mentioned issues. You state that you deploy the projects/solutions via an installer. Presuming that you have a development team/tools that are up-to-date you could perform the upgrades as part of your installer design/development. Why would you not perform the upgrades yourself and include project files in your installer. During installation you would install the version of the project/solutions files that matches the target platform.

Categories : C#

create setup for the project solution in visual studio 2008
A simple way to add setup to your project. (1) File -> New Project -> Other Project Types -> Setup and Deployment -> Visual Studio Installer (2) Add a name to your setup project. (3) Right click Application Folder -> Add -> project output (4) *Select your respective project's solution "primary output from yours.."* (5) *Add the respective 3rd party dlls.* // Never forget this one. (6) Right click setup project in solution explorer and BUILD it. (7) Find the respective setup in debug folder(by default) You will get the .exe and .msi in the folder. You can change the configuration between Debug and Release, Right click the setup project in solution explorer -> Properties. You will find a configuration and select the respective one. Check this What is the difference bet

Categories : Visual Studio

How to add open frameworks to an existing visual studio project/solution
There are three ways Add the project in the solution by right clicking on the solution and then giving reference to this solution. Copying dll from the project and giving reference. Install NuGet package manager and get packages from online Here is the documentation on how to add references http://msdn.microsoft.com/en-us/library/wkze6zky(v=vs.80).aspx

Categories : Visual Studio

Is Visual Studio 10 expected to compile C# files that are not part of the solution?
Short answer: No. It only compiles whatever is is included in the .csproj marked as 'compile' (in the file properties window). Try to refresh the project, open the .csproj as a file text and check if those files are referenced there. Lastly, it might be a dependent project that references those files. If you can't find the solution, paste the exact error given by VS For clarification, solutions files (.sln) contains project files (.csproj); .csproj files are the ones that contain references to the files to build.

Categories : C#

how to zip up a visual studio 2012 web service solution folder so that it can be run on another machine
It sounds like the problem you're having is that your solution directory and solution file are stored in the default location (DocumentsVisual Studio 2012Projects), but your project files are stored in another location. If you create a project from scratch this shouldn't happen, but there are a number of ways your project could have wound up in this configuration, so you're not necessarily doing anything wrong. Here's how to fix it so that you can deliver the entire solution or solutions to your teacher: Open up your solution in Visual Studio. Open the Solution Explorer View either from the View menu or by typing Ctrl-Alt-L. If it's already open, just select it. Select the first project in Solution Explorer. Open the Properties View either from the View menu or by typing Ctrl-W, P. If i

Categories : Wcf

Visual Studio 2012 Ultimate: count code lines in Team Explorer
You don't really need special Visual Studio feature for this. You can just download this project and launch next command in PowerShell: ls *.cs -r | sls . | wc -l Just open PowerShell console, go to the root folder where if your project located and launch this command. It will find all cs files (recursive) select all lines and count the lines in these files. This command in details: ls *.cs -r - get all files recursive from current folder (ls is an alias for Get-Children) | - move results to next command (pipeline) sls . select all string from file (sls is alias for Select-String). So for each file it gets from ls command it will select all lines. You can use regular expression to select what kind of lines you want to get, for example you can write something like select-string "^.

Categories : Visual Studio 2012

filter unit tests in test explorer in visual studio 2012 by both property name and value
There is no direct way of doing this, but there are several workarounds that can be used to achieve your needs. 1. If you don't have any other traits (TestPropertyAttribute, TestCategory, Priority or Owner) on your tests, you can do it by defining two filters like this: Trait:"B" Trait:"1" But you have to be careful, because that filter would also return all of theses tests: [TestPropertyAttribute("B", "1")] [TestPropertyAttribute("B", "10")] [TestPropertyAttribute("B", "100")] [TestPropertyAttribute("B", "21")] [TestPropertyAttribute("B", "31")] So in that case you would need to add some leading zeros to solve the problem: [TestPropertyAttribute("B", "001")] [TestPropertyAttribute("B", "010")] [TestPropertyAttribute("B", "100")] So you could use arcodingly with the filter: Trai

Categories : Visual Studio 2012

Visual Studio 2012 doesn't apply changes unless I clean / rebuild the solution first
It seems that when you create a Windows Phone application project that has an empty space in its name (as example "The Project"), Visual Studio breaks and does not correctly track the changes in the project files to invalidate them when building.

Categories : C#

Typescript file will not compile when I build solution (Visual Studio 2012)
Install the TypeScript for Visual Studio plugin you will be able to see the JS code as soon as you save the TS file. You can also debug the JS this way.

Categories : Visual Studio 2012

How to save startup project preference in Visual Studio 2012 solution
http://www.codeproject.com/Tips/756153/The-Solution-User-Options-Suo-File-in-Visual-Studi maybe it's too late to say anything here, but I'm writing. According to the page above, start-up project is saved in *.suo as it is a setting not for each project that is in the solution but for solution itself.

Categories : Visual Studio

Nant using devenv to build and publish Visual Studio 2012 Solution?
Forget devenv and use msbuild. <property name="MSBuildPath" value="C:WINDOWSMicrosoft.NETFrameworkv4.0.30319MSBuild.exe"/> <target name="buildSolution" depends="clean"> <exec program="${MSBuildPath}"> <arg line='"${BuildRootFolder}Solution.sln"' /> <arg line='/property:Configuration="Release";DeployOnBuild=true;PublishProfile=Deployment' /> <arg value="/target:Build" /> <arg value="/verbosity:normal" /> <arg value="/nologo" /> </exec> </target>

Categories : Visual Studio 2012

Install older NuGet package for entire Visual Studio solution
Install a package to a specific project using the command line: Install-Package Common.Logging -Version 1.2.0 Then right click on your solution and go to manage nuget packages for solution. Go to the installed packages section and install it to the projects you need to. It's not as simple as doing it in one step but it works.

Categories : Jquery

How to choose Visual Studio solution Platform Toolset for maximum compatibility
This is a somewhat tricky situation. One of the underlying problems here is that VS2010 and VS2012 use MSBuild to build C++ projects, but VS2008 farmed it out to VCBuild instead. You can see this by comparing the project files. VS2010/VS2012 use .vcxproj, while VS2008 uses .vcproj. If I'm not using features specific to newer versions of Visual Studio, is it possible to set up a solution which can be opened and run without modification in as many versions as possible (ie. 2008, 2010, or 2012)? If so, how? For maximum compatibility, you want to target the lowest common denominator (i.e. vc90 in this case). Note that when you do the upgrade, the solution file and project files get upgraded to the latest version, which may break compatibility with older versions of Visual Studio.

Categories : Visual Studio 2010

Why added Data Connections in Server Explorer doesn't stay in Visual Studio 2012?
%AppData%MicrosoftVisualStudio11.0ServerExplorerDefaultView.SEView if you delete this file, then it is created again and it has no use. Just delete your web.config or other config files like app.config connection strings that you don't need them again. I test it for about half a day and deleting the unneeded connection strings from config file help me not loading again that connection string in server explorer of visual studio 2012. Wish you luck

Categories : Visual Studio

Why does Visual Studio's MVC template set ViewBag.Title in views rather than in the corresponding controllers?
its on the coder to decice what action method return what views.. so your controller OR Action method might just return a JSON object or an HTTPResponseCode in that case there is no point setting the title inside the controller or action method.. its ultimately is a presentation thing as you might also not want to display to say Create on a view that creates your entity instead you might wanna say Create which now depends upon the action method and the controller.

Categories : C#

Referencing a Visual Studio solution in a different source control repository whose folder is different for different users
I have used each of the following as solutions to this problem (you could use either, but not both). Use a standard directory structure for your developers. For example: {basePath}/{user}/{repositoryName} This allows you to use relative paths to reference other repositories, as long as you know the {repositoryName} for the repository the project is contained in. Relative paths also allow you to use any {basePath}, so this quite a flexible system. However, there is always a concern that the version of your dependent projects may not be the expected version, potentially leading to strange outputs. For your issue reports, your developers will have to explicitly give the commit hash for both the main repository and the dependencies they are currently working with. Use subrepositories. Thi

Categories : C#

How to build visual studio solution file .sln command line with selected project
You could make a solution containing just the projects you want to build. Alternatively you could make an MSBuild .proj file that collects together the projects you want to build: <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <ProjectsToBuild Include="X.csproj;ChildY.csproj" /> </ItemGroup> <PropertyGroup> <Configuration>Release</Configuration> </PropertyGroup> <Target Name="Build"> <MSBuild Projects ="@(ProjectsToBuild)" ContinueOnError ="false" Properties="Configuration=$(Configuration)"> <Output ItemName="OutputFiles" TaskParameter="TargetOutputs"/> </MSBuild> </Targe

Categories : Visual Studio 2010



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.