I am currently working on a SharePoint site, I am trying to optimize my workflow. I work on the front-end, and I really don't like using Visual Studio 2010 as it is very slow. I prefer Sublime Text for doing my front-end work, as this is the editor i normally use.
I use Grunt.js to automate build SCSS and JS files, it's triggered via a Visual Studio 2010 Pre-Build Event. This works fine for the build process but not so well for my development process.
The Pre-Build Event copies my /_layout/ folder to the servers /_layout/ folder. The problem is with user-controls ect, these are not in identical folders, they might be in one folder on the project and another one when deployed.
I can edit my files in Sublime Text, but I then have to go into Visual Studio 2010 and Quick Deploy using the CKS-Dev addon. It would be nice if I could run a command in CMD that would trigger a quick deploy.
Do you have any solutions to this? Or any knowledge that would leverage my workflow?
Related
I am trying to deploy an web application that was created on VB with the .NET Framework 2.0 using the TFS 2017 continuous deploy. It doesn’t have a solution file inside like vbproj or csproj, so I needed to avoid all the suggestions to include extra information on the vbproj.In order to run the MSBuild even locally I need to change in my .sln this tag, so all my compiled code is also there
Debug.AspNetCompiler.TargetPath = "....\PrecompiledWeb\ARB\Debug\"
Unfortunately, I can’t deploy the application using the TFS. So far I tried to deploy it through my Visual Studio project, and is working fine with every option: I tried MSDeploy, Web Deploy Package, and FileSystem, and is working fine from the Visual Studio Publish Option
With that, even my transformation take place.
Now lets say I go to my TFS and I put this parameters on the MSBuild
/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsASingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="\\MyServer\Content"
My files are compiled but never stored in my Content folder. No one of them!!! I can’t figure out what is going on here.
From your screenshot, you are using a Web Site project, not a Web Application project. The output structure of a Web Site project in TFS is different from build in VS (you can see a PrecompiledWeb folder in your build source directory on build agent server). Instead of using MSBuild argument, you can consider add tasks below to copy the files you want to publish:
We strongly suggest you switch from Web Site projects to Web Application projects to avoid these issues.
Hi guys i'm new both to this site and to testing and i'm having trouble finding solutions to this problem.
My current project produces a .DLL file as its build and im looking to use visual studio to automate testing on it every time a new build kicks off.
To run the program a .exe must be triggered in the same directory as the newly created .dll this isn't a problem and wouldn't need automating except i need to kick of 16 different variations of it using different config files and separate machines on a physical network for each variation.
Is there anyway to do this using visual studio 2010 ultimate and MTM?
I have looked into generic testing but it runs the exe without moving the new .DLL to the working directory any ideas?
Thanks in advance.
I haven't used VS 2010, but I know in 2008, you can specify Post-Build actions in the project properties, that you could use to copy the output where you need it to go. I would give you more details, but I'm not at work to look at the interface at the moment.
I have a rather large HTA that I still need to maintain. I originally wrote it using Notepad++, but because of its growth I am now interested in the Intellisense capabilities offered by TypeScript. It would also be helpful to have Visual Studio's HTML and CSS development tools.
I am aware that I'll have to add type annotations to the application, but it is still worth my while, and can be done gradually.
Using the File -> New Project -> HTML Application with TypeScript outputs a DLL for use with IIS Express or another web server. The output I need is the HTML, CSS and TypeScript compiled to Javascript with references adjusted in the HTML.
In short, I need the following:
Output HTML/CSS files instead of a DLL (The extension should be renamed to .hta but I can do that in a post-build step.
Output TypeScript files as Javascript
Intellisense for all TypeScript/Javascript files included in the project
Optionally, allow adding Javascript/TypeScript libraries via Nuget (I can add them by hand, but I would prefer not to).
Optionally, Visual Studio debugging (Using the debugger keyword in Javascript allows me to start a debugging session with Visual Studio, once the HTA is started using the mshta.exe executable. However, it would be nice to set breakpoints in the editor window without modifying the code.)
How can I use Visual Studio (2013 Professional) for this scenario?
NB. I have extensive experience using Visual Studio for desktop applications (C#/VB.NET and WPF) but I have no experience in Web development. I have a fair knowledge of HTML, CSS and Javascript in the HTA environment.
Update
I tried creating a new web site (File -> New Web Site ...) but I cannot add TypeScript files to the site.
I created a new "HTML Application with TypeScript" project. That gives me points 1-4.
I renamed "index.html" to "index.hta" in the solution -- no need to do this in post-build. Visual Studio recognizes the .hta extension as an HTML file.
I set the build properties to open mshta.exe as an external program, with the full path of the HTA as a command-line argument. I haven't been able to attach the current Visual Studio window to the HTA process (so no breakpoints), but the debugger statement opens a JIT debugging dialog box and prompts to open a new Visual Studio session, with full debugging capabilities.
An unexpected bonus is that I can debug the TypeScript file, and I am not limited to debugging the generated Javascript.
Update
Currently, I would prefer to use Visual Studio Code for HTA development; VS Code was not available at the time that I answered this. For this task, Visual Studio offers no benefits over VS Code.
VS 2013 works very well. There are Grunt/Gulp task runners, some made by MS, others made by third parties, for VS 2013.
Use Grunt or Gulp as part of your build process. You can start Grunt and Gulp as a build task. Either task runner should be used to minify, concatenate and version js, and styles. It can even be used to compile Typescript, though msbuild does a good job with that.
Ignore the dll made by Msbuild. Don't deploy it. The team I am working on is building an spa application on vs2013 with typescript that gets double and deployed to Linux/Apache as a two minimified js files, one css file, some image and font assets, and a index.html file.
How do I create a Visual Studio Project for Development on my Local PC that links to Existing files and folders on a Server?
My employer has a large website. Most of that girth (close to 100 GB) is contributed to Portable and Image document (i.e. PDF and JPEG) files, but there are also numerous web files (.html, .aspx, .php, etc).
We have the following folders:
a WORKING folder that contains everything that is "Live" on our web server.
a BETA folder that contains newest technologies that are being tested and tried.
a DEVELOPMENT folder that contains numerous copies of projects that are being worked on by the different developers.
Developers are allowed to use whatever tools they prefer, so we have people who develop using Notepad++, Dreamweaver, Komodo, Zend Studio, and (now) Visual Studio.
It is NOT OK for me to create Visual Studio Projects for myself on the network servers. Other developers using other tools are not creating solution files or \bin and \obj folders on the servers, and I certainly should not be either.
So, to work on a file in Visual Studio, I use Windows Explorer to browse to the location, then I open it in the IDE.
However, this causes me to lose a lot of the power of Visual Studio - particularly if other classes used in this file, because I would have no access to the Intellisense for that class and I cannot simply Right-Click and go to definition.
Also, since each development environment is so large, I can not copy them to my laptop with its high tech 125 GB Solid State Drive (should be interesting to read that in a couple of years).
What I would like to do is create the Visual Studio Projects on my local drive, and then have them reference the files and folders on our network.
I've looked and found these similar questions, but my goal is slightly different:
Working efficiently on remote projects in Visual Studio
How do I add an existing directory tree to a project in Visual Studio?
How to "Add Existing Item" an entire directory structure in Visual Studio?
These are all great topics, but none of them show a way to create a local project that uses remote files.
It would seem that developers in large company teams would have already developed a way to do this, and that I just do not know what it is called.
I have found a way to do this!
For a long time, I was working with 2 sets of folders. One for our repository and one for Visual Studio.
I'd make changes in Visual Studio, then copy those working files over to the repository folder.
That was time consuming! Very.
Here is how I found to fix it: Open the Visual Studio Project file (*.csproj, *.vbproj, or *.phpproj) in NOTEPAD with Visual Studio closed.
Locate the <ItemGroup> tab, and change every path to be from the one shown to one that uses a relative path to get to the actual files.
Notepad's Replace... CTRL+H will save you hours here!
It makes a funky looking project environment, but it works!
If this helps anyone else or if it were even something you didn't know you could do to manipulate Visual Studio, kindly vote it up.
I think this is a simple question, but I can't seem to find a clean solution.
I am working on a parallel program on my local (dual core) developer machine. I develop for a while, then I want to run it on a multi-core server somewhere else. I have a settings file that is different (paths, etc.) between the two instances, but otherwise it is a straight deployment.
What I would like to do is have a "publish" option where I can just deploy it to server when I am ready. I don't want it to overwrite the settings file on the server, but I do want it to update any other files. I publish a ASP.NET web site this way and it works great. However, when I publish a console app, it wants to actually create an installer, which I don't want. I really just want an XCOPY publish over FTP, but one that won't overwrite changed files on the server.
I've tried subversion, and some FTP syncing things, but those all require an extra step. Is there an easy way to do this?
Not 100% sure what you're after, but WinSCP (free) has a directory synchronisation feature, which monitors a local directory for changes, and FTPs updated files to your server.
You can't do the type of publishing you want with a console app in Visual Studio 2010. It will always try to build a click once deployment which isn't your goal. I think this thing was possible to do in previous versions of Visual Studio 2010.
I have a similar situation and I just resign myself to copying in windows explorer for local servers. With your destination being an FTP site you will need to find some sort of automated or batch FTP utility unfortunately.
You could launch the ftp batch from the "Run the post-build event" feature in the Build Events tab on the console app's property page. That would save you some extra clicks.