简体   繁体   中英

Custom nuget feed, VS doesn't see package as installed

Hi all I have a local Nuget source with a package containing some default items I want in my projects (default corporate models and styles and some default pages). It is only copying items in to the project and adding a connection string to the web.config, nothing fancy.

I can install the package via the Package Manager Console and the GUI. However, it never shows as installed. This means that I cannot update it nor can I uninstall it. If I go to the GUI, it shows the package as not installed, even though it has added all items to the project and has a folder for the package in the packages directory.

Also, I want to use this NuGet package to overwrite some files that already exist in the default MVC project (such as AccountController and LogonUserControl.ascx). Can this be done or will I need to start off with the blank MVC template instead of the default?

Packages.config:

<?xml version="1.0" encoding="utf-8"?>
<packages>
 <package id="MyCompanyMVC" version="1.1" />
</packages>

NuGet不会覆盖文件-我不相信有一种强制方法,但是您可以通过使用PowerShell脚本(tools / install.ps1)删除旧文件并重命名注入的文件来“解决”此问题具有所需的名称。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM