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

Asp.net Core项目在VSTS中无法签入bin文件夹内DLL文件求助

解决方案:VSTS中签入ASP.NET Core项目bin文件夹内的DLL文件

Hey there, let's work through why your bin folder DLLs aren't checking into VSTS and how to fix this. First off, a quick note: usually, bin/obj folders are excluded from version control because they're build artifacts that can be regenerated, but if you have a specific need to check them in, here's what to do depending on your version control system in VSTS:

If you're using TFVC (Team Foundation Version Control)

  • First, check the ignore settings: Open Team Explorer, go to Settings > Source Control > Ignore Items. Look for rules like bin/ or *.dll that might be blocking your files. If you find them, you can either remove the rule temporarily or add an exception for your specific DLLs.
  • Next, manually add the DLL to source control: In Solution Explorer, find the DLL in your bin folder, right-click it, and select Add to Source Control. VSTS should now recognize the file as part of your pending changes.
  • Finally, confirm it's included when checking in: Open the Check-in window. If the DLL is in the Excluded Changes section, click Promote to move it to Included Changes. Add a check-in comment, then complete the check-in.

If you're using Git

  • Start by editing your .gitignore file: Head to your project root and open .gitignore. You'll see lines like bin/, obj/, or *.dll that tell Git to ignore these files. To check in the entire bin folder, comment out the bin/ line by adding a # at the start. If you only need specific DLLs, add an exception rule after the ignore line, like:
    !bin/Debug/YourCritical.dll
    
    (Exception rules have to come after the ignore rules they override, so make sure the order is right.)
  • Stage and commit the DLL: Open your Git terminal or tool, run git add bin/Path/To/Your.dll to stage the file, then commit it with git commit -m "Add required DLL from bin folder".
  • Push to VSTS: Finish up by pushing your commit to the remote repo with git push.

A quick best practice note

While checking in build artifacts is possible, it's usually not recommended. These files can be regenerated by building the project, and adding them bloats your repo. Consider using NuGet for dependencies, or setting up a CI/CD pipeline in VSTS to build the DLLs automatically when needed. That way, your repo stays clean and you don't have to manage these files manually.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.20 11:16:46