I have an Asp.net 5 project with a package.config in the root. This creates a hidden node_modules folder in the root. Visual Studio can't see it (unless you choose 'show all files') and TFS does not see it.
Using gulp, I copy some files under node_modules to the wwwroot folder so they will be available to my client. I mimic the same structure starting with a node_modules folder in the wwwroot folder. I can't seem to hide these from VS/TFS.
I have a .tfignore file in the wwwroot folder with this line:\node_modules. I have also tried using .tfignore in other places, such as at the solution level. I can't get it too work.
I tried editing the project file and adding DnxInvisibleContent but it seems to only work at the file level and not on the entire folder. I have this entry which is not working:
<DnxInvisibleFolder Include="wwwroot\node_modules\" />
(I also tried DnxInvisibleContent)
I have this is project.json but it's not doing it.
"exclude": [
"wwwroot",
"node_modules",
"wwwroot/node_modules"
]
I am using Visual Studio 2015 with update 1. I don't really have to hide node_modules from VS but I need to hide it from TFS.
This is my project layout. I have one .tfignore at the project level and another inside wwwroot.
solution
-.tfignore
-Angular2Client
----wwwroot
-------node_modules
-------.tfignore
The contents of .tfignore at the solution level is:
\packages
\.vs
\wwwroot\node_modules
The contents of .tfignore in the wwwroot folder is:
\node_modules
Assuming you are using ASP.NET 5 RC1, it seems this is a known issue with ASP.NET 5 RC1, will be fixed in RC2:
https://github.com/aspnet/Tooling/issues/289
Related
I am having an issue with building a sln on Jenkins. I know what the problem is I just have no idea how to fix said problem. So the sln imports a project that is not located in the same folder as the sln. This is not an issue with other sln files that we do the same thing with. As you can see below instead of .. to get back to parent directory it is a looking for a .. directory which obviously doesn't exist.
D:\Path\To\sln\OurSolution.sln.metaproj : error MSB3202: The project file
"D:\Path\To\sln\..\..\PathTo\SharedProject\Shared.csproj" was not found
[D:\Path\To\sln\OurSolution.sln]
Edit your .sln file and have it point to the .csproj file that does exist.
Also, double check your working directory to make sure it's the directory where the solution exists.
Paths in the .sln file need to be relative to the location of the .sln file so that when Jenkins can checks out the entire solution into its workspace from source control the paths resolve.
Check that the paths in the solution file are indeed relative to the solution file.
Check that all the project files defined in the solution file (and all their files in turn) are indeed being checked out to the Jenkins job workspace folder.
Where is the shared project in source control in relation to your solution file? Is it in the same repository? If it isn't then my bet is your Jenkins job isn't checking it out from source control into its workspace and therefore not finding it when the solution tries to compile.
Paths your sln and csproj files are relative. .sln and .csproj files paths are relative from where the sit on the file system.
Usually you would expect csproj files to exist in immediate subdirectories of the directory where the .sln file sits.
I've used .tfignore and Nuget.config solution to prevent tfs of detecting changes in packages folder, at the moment it is not detecting the packages folder changes anymore but whenever I add a new package or update the existing one it will detect the changes in possibly Scripts or Content folders. The problem is I cannot explicitly ignore the Scripts and Content folders because there are some custom scripts that have to be checked-in, what I would prefer is just somehow to ignore the scripts caused by package change?
You can ignore the specify files or include specify files in Scripts and Content folders. For example:
#Ignore .cpp files in the ProjA sub-folder and all its subfolders
ProjA\xxx.cpp
# Do not ignore .dll files in this folder nor in any of its sub-folders
!xxx.dll
I'm transpiling TypeScript files from my web project into wwwroot as part of my gulp build. I want Visual Studio Team Services to ignore the output js files in wwwroot, but it constantly detects them as added files and I have to undo. The server is #visualstudio.com. In my wwwroot folder I have a .tfignore file with the following text, which should ignore all files in these folders:
lib\*.*
app\*.*
I have also attempted to add a .tfignore file at the higher level (project root), just to see if I could get it to ignore js files:
wwwroot\app\**\*.js
I've also added the following lines to my .xproj, which seems to have no effect.
<ItemGroup>
<DnxInvisibleFolder Include="wwwroot\app\" />
<DnxInvisibleFolder Include="wwwroot\lib\" />
</ItemGroup>
How do I ignore these folders/files? This is a VS2015 / Asp.net 5 project.
This is a known issue with tfignore file for ASP.NET5 project. Refer to this issue on GitHub for details: https://github.com/aspnet/Tooling/issues/18
I am using the Dart Eclipse plugin following this guide:
http://blog.dartwatch.com/2013/01/integrating-dart-into-eclipse-and-your.html
( without the Maven integration )
If I use the pubspec.yaml file, my project gets spammed with these packages symlinks.
( I am using the "Package Explorer" view from Eclipse )
I would like some control over where these files get created.
I would argue the web root directory and maybe a scripts directory should be enough.
Currently, no, there is no way to control which directories get "packages" directories and which don't. Pub will place "packages" directories in "bin", "example", "test", "tool", and "web", and any subdirectory of those.
Those are all of the directories where a package may be expected to have a Dart entrypoint. Since an entrypoint needs a "packages" directory next to it to be able to use "package:" imports, pub will place one there.
It won't place "packages" directories anywhere else.
I would argue the web root directory and maybe a scripts directory should be enough.
"tool" is pub's convention for a "scripts" directory.
I found the code that generates these directories in dart-sdk\util\pub\entrypoint.dart.
There is a method called: _linkSecondaryPackageDir.
If I add: if (path.basename(dir) != 'web') return;
The packages folder only gets created in the root folder and the web folder, just like I want.
I will test if this breaks anything and report back.
I've now setup a MSBuild script to create the folders and files I need in the right structure for my MVC project. I'm then setting Teamcity up to look at the folder with only the files I want to have and copy that to the artifacts folder. So far, so good!
However, There is a few folders in the structure that are empty, and Teamcity does not copy these folder, even if I've set it up to copy the mainfolder and everything in it.
Is there a way to force Teamcity to copy everything - and by that I mean EVERYTHING in my folder, or does it simply not work?
Teamcity Artifact path settings:
Website => Release
You may find your answer in this post : How do I exclude the contents of a directory but not the directory itself in MSBuild
It's not Teamcity but still MsBuild. The problem is that msbuild's include does not include empty directories...
We manage to work around this and skip the empty folders. Therefore this was no longer an issue. However, still don't know how to copy empty folders. My understanding from doing research for a long while now is that it simply doesn't work.