问题:我的Visual Studio项目中有.sql文件,我想从我的NuGet包中排除.这些.sql文件嵌套到各种目录中,我无法从我的nuget包中成功排除所有.sql文件.
1:我通过在目标项目上运行以下命令创建了一个.nuspec文件:
nuget spec
Run Code Online (Sandbox Code Playgroud)
2:我编辑了生成的nuspec文件,看起来像这样:
<?xml version="1.0"?>
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Security Core Impl</description>
<releaseNotes>Security Core Impl</releaseNotes>
<copyright>Copyright 2013</copyright>
<tags>Security Core</tags>
</metadata>
<files>
<file src="**\*.dll" target="lib\net40\" exclude="**\*.sql;" />
</files>
</package>
Run Code Online (Sandbox Code Playgroud)
3:我运行以下命令来构建我的.nupkg:
nuget pack -Prop Configuration=Release
Run Code Online (Sandbox Code Playgroud)
但是,每当我将此软件包安装到另一个项目中时,都会包含.sql文件.我已经尝试了上面排除的几个不同变体,并尝试了-Exclude开关.似乎没什么用.
所有.sql文件都标记为:
我也试过通过Visual Studio选项清除我的NuGet缓存.
注意: NuGet包托管在专用服务器上.
我已经看到MEANJS堆栈中的grunt有一个文件监视器来自动执行任务,例如在文件更改时移动文件.在.NET领域是否有这样的东西,或者我最好安装node.js并将grunt添加到我的开发堆栈中?我真的希望在编辑和保存时将.js/.css/.cshtml从我的代码库移动到我的wwwroot.
我正在使用Typeahead.js,其实现看起来与示例中的"多个数据集"非常相似:
var nbaTeams = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('team'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
prefetch: '../data/nba.json'
});
var nhlTeams = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('team'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
prefetch: '../data/nhl.json'
});
var footer = function (context) {
// calculate total hits here
return "<a href='...'>" + count + "</a>";
}
$('#multiple-datasets .typeahead').typeahead(null, {
name: 'nba-teams',
display: 'team',
source: nbaTeams,
templates: {
header: '<h3 class="league-name">NBA Teams</h3>'
},
limit: 3
},
{
name: 'nhl-teams',
display: 'team',
source: nhlTeams,
templates: {
header: '<h3 class="league-name">NHL Teams</h3>',
footer: footer …Run Code Online (Sandbox Code Playgroud) 一点背景:我正在编写一组C#类来将SOAP连接器包装到另一个名为Jira的系统中.Jira公开的SOAP连接器有太多功能用于我的目的,所以我试图简化界面.
我的设置:在C#/ Visual Studio 2010中,我的解决方案布局如下:
JiraService
Properties/
AssemblyInfo.cs
Settings.settings/
References/
...
System.Web.Services
Web References
devjira.soap /* my connector to the jira soap reference i'm wrapping */
Types/ /* these are data classes i'm trying to expose for the user */
Comment.cs
Issue.cs
Project.cs
User.cs
app.config
Jira.cs /* main class I'm trying to provide to user */
Run Code Online (Sandbox Code Playgroud)
Jira.cs位于JiraService命名空间中.Comment.cs,Issue.cs,Project.cs和User.cs都在JiraService.Types命名空间中.Jira.cs实际上公开了一些方法,这些方法可以获取或返回Types目录中找到的类.在属性下,我将Default命名空间设置为JiraService,将Output类型设置为Class Library.
我的问题:当我构建解决方案时,我会离开JiraService.dll.当我将此引用添加到另一个项目时,Jira,Comment,Issue,Project和User类不在所包含的.dll的JiraService或JiraService.Types名称空间中.唯一可用的命名空间是JiraService.devjira.soap,我正在尝试简化和隐藏的库!我究竟做错了什么?为什么我的课程没有出现在最终的图书馆?
感谢你的帮助!
我创建了一个代表 Visual Studio 项目向导(vsix 包)的 Visual Studio 扩展。我正在尝试连接 log4net,但没有成功。我已将问题归结为 app.config 未正确加载。
我已将其添加到我的 Visual Studio 扩展中的 app.config 中:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="test" value="hello world"/>
</appSettings>
</configuration>
Run Code Online (Sandbox Code Playgroud)
在我的 IWizard 实现中,我添加了这行代码:
var test = System.Configuration.ConfigurationManager.AppSettings["test"];
Run Code Online (Sandbox Code Playgroud)
然而,test调试时上面的变量始终为空。
我已经验证了这些事情:
C:\Users\<user>\AppData\Local\Microsoft\VisualStudio\16.0_...\Extensions\<Name>\<Company>\1.0文件夹中我缺少什么?如果 VSIX 扩展开发中不允许使用 App.config,那么您将如何连接 log4net?
bloodhound ×1
c# ×1
gruntjs ×1
gulp ×1
javascript ×1
log4net ×1
nuget ×1
soap ×1
typeahead.js ×1
vsix ×1