You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Visual Studio 2017中创建可自定义文件格式的空白项目?

Hey there! I totally get the frustration when a familiar workflow shifts between VS versions—let me walk you through how to create that flexible blank project in VS2017 Enterprise that lets you add any file type you want, just like you did in 2015.

解决方案:创建可添加任意文件的空白项目

方法1:空白解决方案 + 完全自定义结构

This is the most flexible approach, giving you full control over every part of your project:

  • Open VS2017, go to File > New > Project
  • In the left template list, navigate to Other Project Types > Blank Solution, name your solution, pick a save location, then click "OK"
  • Right-click the solution name in Solution Explorer, select Add > New Folder to create your HTML, CSS, JS, or any other folders you need
  • To add files:
    • Right-click a folder (or the solution itself), choose Add > New Item—you can select built-in types like HTML pages, CSS files, or JavaScript files. If you need a file type not listed, pick General > Text File then manually rename its extension (e.g., .json, .md, .txt)
    • You can also drag-and-drop existing files from your local drive directly into Solution Explorer, and VS will add them to the project automatically

方法2:ASP.NET Empty Web App (贴近VS2015站点体验)

If you prefer a workflow closer to the "new site" option in VS2015:

  • Go to File > New > Project, select Visual C# > Web > ASP.NET Web Application (.NET Framework)
  • In the pop-up "New ASP.NET Web Application" window, choose the Empty template, then click "OK"
  • You’ll get a blank web project. Right-click the project name, select Add > New Folder to set up your HTML/CSS/JS folders. Adding files works the same way as above—use built-in templates, drag-and-drop, or add custom text files with renamed extensions

Quick Tip: Add Any Existing File Fast

If you need to add a file type not included in VS’s templates:

  • Right-click the target folder, select Add > Existing Item
  • In the file picker window, click the "File type" dropdown at the bottom-right and choose All files (.)—this lets you select any file on your computer to add to the project

With these steps, you’ll have the same flexible project structure you had in VS2015, free to add any file type you need!

内容的提问来源于stack exchange,提问作者hittle08

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 08:01:41