我有一个由tfs管理的存储库.但是在本地我想通过git管理它,推送更改为tfs.一旦我在那里创建git repo,团队资源管理器中的VS2013就会显示由git管理的解决方案.如果我尝试编辑任何文件,它会抱怨该文件只读,我无法将其保存在以前的版本中.所以我的问题是Visual Studio 2013有什么方法可以忘记git并将其作为tfs存储库进行管理.我可以从命令行管理git.或者,当我进行更改时,有没有办法让它从tfs repo签出文件?
我正在编写一个Angular 4应用程序,需要从Asp.Net WebApi获取一些数据.我们正在为WebAPI使用Windows身份验证,我想知道如何将用户的Windows身份从我的Angular应用程序传递到WebApi.我发现了几个涉及使用MVC应用程序嵌套应用程序的示例,但我希望UI远离MVC.有没有办法在不将.net mvc添加到我的Angular网站的情况下做到这一点?
我有一个使用 Angular 材料的网站。我喜欢元素,除了默认字体大小和元素都很大之外的一切。为了以可接受的比例查看网站,我或我的用户必须在桌面上缩小至少 75%,而且我的大多数用户都是桌面用户。有没有办法在角度材料中指定使用较小的字体、元素等?
我正在尝试在容器内运行开发数据库而不是我的本地实例。但是,在我们的本地 dev db 版本中,我们使用弱密码(当 db 被部署到 prod 时,密码很强)所以当我尝试在我的容器内创建服务器用户时,它抱怨弱密码和 SQL Server 项目的部署失败。
有没有办法在 SQL Server 容器中关闭强密码?
我知道您可以通过在代码中使用以下行来忽略证书错误:
ServicePointManager.ServerCertificateValidationCallback += ( sender, cert, chain, sslPolicyErrors ) => true;
Run Code Online (Sandbox Code Playgroud)
但是,我想知道是否有办法通过 web.config 文件来做到这一点。原因是 b/c 我们可以通过 defaultProxy 在 web.config 中指定代理服务器,任何 HttpClient 都将使用代理。当我们将 Fiddler 指定为代理并启用流量解密以便我们可以调试对 3rd 方服务的调用时,就会出现问题。但是,在这种情况下,我们会收到证书错误,使用该行可以忽略该错误,但我希望在不重新编译我们的服务的情况下执行此操作。
我试图挂钩OData for .net core web api.版本6.15似乎支持它(https://www.nuget.org/packages/Microsoft.OData.Core/6.15.0).有谁知道如何将它挂钩到应用程序?
在我的应用程序中,我有从自定义基本服务继承的服务(正在调用其余服务),该服务定义了在所有其他服务中使用的公共方法和属性.其中一个参数是我的休息服务的基本URL,它在环境下使用变量.但是现在需要使这个url来自配置文件.因此,我必须使用httpclient来获取它,这提出了一个问题,现在当实际服务尝试使用基本URL时,它还没有解决.有没有办法等待电话结算?我的代码看起来像:
基service.service.ts:
export class BaseService{
protected apiUrlBase: string;
constructor(protected _http: HttpClient) {
// some logic
this.getConfigData()
.subscribe(
x => {
this.apiUrlBase = x.apiUrlBase;
}
);
}
getConfigData(): Observable<any> {
return this._http.get(
'../../assets/config.json'
)
.do(x => {
})
.catch(error => {
alert('Unable to read configuration file:' + JSON.stringify(error));
return Observable.throw(error);
});
}
}
Run Code Online (Sandbox Code Playgroud)
一些-data.service.ts:
@Injectable()
export class TestService extends BaseApiService {
private get _someDataServiceUrl(): string {
return this.apiUrlBase + '/api/v1/somedata';
}
constructor(_http: HttpClient) {
super(_http);
}
getSomeData(): Observable<ISomeData[]> {
return this._http.get<ISomeData[]>(this._someDataServiceUrl) …Run Code Online (Sandbox Code Playgroud) 我想将我的mdInput控件设置为在其周围有一个黑盒子:
<md-form-field>
<input type="text" mdInput [(ngModel)]="row.price" placeholder="Price">
</md-form-field>
Run Code Online (Sandbox Code Playgroud)
我尝试在输入控件周围放置一个div,其中style ="border:1px solid black;" 但是它只在输入控件本身周围创建边框.我试图将边框添加到md-form-field但是它只在左侧和右侧放置边框(但是如果我能够在顶部和底部获得边框,它看起来像我能够实现的任何方式来判断高度)实现那个?
我正在为分析器构建CodeFixProvider,它正在检测方法声明中是否缺少自定义属性.基本上应该添加到方法的自定义属性看起来像
[CustomAttribute(param1: false, param2: new int[]{1,2,3})]
Run Code Online (Sandbox Code Playgroud)
这是我到目前为止所得到的:
public sealed override async Task RegisterCodeFixesAsync( CodeFixContext context ) {
var root = await context.Document.GetSyntaxRootAsync( context.CancellationToken ).ConfigureAwait( false );
var diagnostic = context.Diagnostics.First();
var diagnosticSpan = diagnostic.Location.SourceSpan;
var declaration = root.FindToken( diagnosticSpan.Start ).Parent.AncestorsAndSelf( ).OfType<MethodDeclarationSyntax>( ).First( );
context.RegisterCodeFix(
CodeAction.Create(
title: title,
createChangedSolution: c => this.AddCustomAttribute(context.Document, declaration, c),
equivalenceKey: title),
diagnostic);
}
private async Task<Solution> AddCustomAttribute( Document document, MethodDeclarationSyntax methodDeclaration, CancellationToken cancellationToken ) {
// I suspect I need to do something like methodDeclaration.AddAttributeLists(new AttributeListSyntax[] …Run Code Online (Sandbox Code Playgroud) 我正在尝试编写一个构造函数,该构造函数假定调用类中定义的方法并将结果分配给成员。在C#中,它将类似于:
public class Test
{
public int Value { get; private set;}
private static int SomeLogic(int a, int b)
{
return a + b;
}
public Test(int a, int b)
{
this.Value = SomeLogic(a,b);
}
}
Run Code Online (Sandbox Code Playgroud)
但是我不知道该怎么做F#。
我正在尝试使用Microsoft.TeamFoundation.WorkItemTracking.Client查找与工作项关联的所有更改集.使用查询我能够获得有关工作项的信息,但是我无法找到有关我正在返回的对象的任何变更集信息.除此之外,还有一些变更集与特定工作项无关,但可通过评论轻松识别.有没有快速的方法来使用tfs api找到这些?
编辑:这不是如何使用tfs api获取与变更集ID相关联的工作项的副本?b/c在该问题中,人员有变更集,并希望找到相关的工作项目.在我的情况下,我有一个工作项,我想找到与特定工作项相关的所有变更集.除此之外,我需要找到评论中具有特定字符串的所有变更集.
angular ×3
c# ×3
tfs ×2
asp.net-core ×1
azure-devops ×1
docker ×1
f# ×1
git ×1
httpclient ×1
odata ×1
roslyn ×1
sql-server ×1
tfs2013 ×1
web-config ×1