Environment:
Developing on Microsoft Visual Studio Professional 2013, specifically Version 12.0.31101.00 Update 4 with Microsoft .NET Framework Version 4.5.51209.
In my website project, I have some javascript files that are automatically minified by Visual Studio. This means that when I have a file named "myscript.js," Visual Studio will create a minified version called "myscript.min.js" -- which is quite convenient.
The issue arises when trying to publish only the minified version of the file instead of both the source and minified versions. When using the "Publish myscript.js" option in Solution Explorer, Visual Studio publishes three files: myscript.js, myscript.min.js, and myscript.min.js.map.
However, I desire to only publish the minified version of the file to the web site. If I try to exclude the source file by right-clicking on "myscript.js" and selecting "Exclude From Project," Visual Studio also excludes the minified version of the source file.
Is there a setting within Visual Studio that allows for the publication of only the minified version of the file when choosing the "Publish" option in Solution Explorer?
PLEASE NOTE: I am not seeking an MSBuild or MSDeploy solution as this is a website project, not a web application. My goal is to publish individual files (specifically javascript) one at a time without including the main source file - just the minified version.
The current workaround involves manually publishing the minified version and then deleting the source file from the server. It would be beneficial if Visual Studio had a feature that prevented the upload of the javascript source file to the server.
Could it be possible that such a feature does not exist? At this point, I am simply seeking confirmation.
Thank you.