I'm using nuget and am downloading the AjaxControlToolkit. The problem I have is that I don't want 20 extra folders to be created in the bin directory for different languages. Each folder only has a single file named 'AjaxControlToolkit.resources.dll' in it. I don't need the extra folders as our app will never be used with anything but English.
The only way that I've been able to omit the files is to follow this: http://blogs.msdn.com/b/webdev/archive/2010/04/22/web-deployment-excluding-files-and-folders-via-the-web-application-s-project-file.aspx where you have to manually add a line to the actual project file. I feel like there should be a better way to do this.
EDIT: This is the line that I currently add to my .csproj file:
<ExcludeFoldersFromDeployment>Bin\ar;Bin\cs;Bin\de;Bin\es;Bin\fr;
Bin\he;Bin\hi;bin\it;bin\ja;bin\ko;bin\nl;bin\pl;bin\pt;
bin\ru;bin\tr-TR;bin\zh-CHS;bin\zh-CHT</ExcludeFoldersFromDeployment>
NuGet was created in 2010 (under the name “NuPack”) by the Outercurve Foundation, a non-profit founded by Microsoft. The goal of this foundation was to "enable the exchange of code and understanding among software companies and open source communities." The Outercurve Foundation was a precursor to the current .
The global-packages folder is where NuGet installs any downloaded package. Each package is fully expanded into a subfolder that matches the package identifier and version number. Projects using the PackageReference format always use packages directly from this folder.
The information about the NuGet package dependencies for your project is stored in this . csproj file. NOTE: For . NET Framework projects and more generally for non-SDK-style projects, the package dependencies are by default stored separately in a packages.
NuGet provides the tools developers need for creating, publishing, and consuming packages. Most importantly, NuGet maintains a reference list of packages used in a project and the ability to restore and update those packages from that list.
No you cannot switch this "feature off" Nuget simply downloads the archive package and places the files where thee package information file says the files are to go.
You need to manually omit these files yourself - or, build your own AjaxToolKit from their source with the extra languages omitted in advance.
I had the same problem (similar answer here) and I haven't found a better way to do it either, I pursued the same method you mentioned however for some reason "ExcludeFoldersFromDeployment" didn't seem to work for me, but I found a alternative way to do the same thing though:
<ItemGroup>
<FluentValidationExcludedCultures Include="be;cs;cs-CZ;da;de;es;fa;fi;fr;ja;it;ko;mk;nl;pl;pt;ru;sv;tr;uk;zh-CN;zh-CHS;zh-CHT">
<InProject>false</InProject>
</FluentValidationExcludedCultures>
</ItemGroup>
<Target Name="RemoveTranslationsAfterBuild" AfterTargets="AfterBuild">
<RemoveDir Directories="@(FluentValidationExcludedCultures->'$(OutputPath)%(Filename)')" />
</Target>
(Basically I put custom build events to clear out the extra files by deleting them after the build is run...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With