小编ff0*_*0e2的帖子

如何从命令行覆盖解决方案的 aspnetcompiler.targetpath?

我正在打电话 MSBUILD.exe \pathtosolution\solution.sln /p:Configuration=Release /p:OutputDir=\pathfordlls\ /p:WebProjectOutputDir=\pathtocompileto\

当它完成将 DLL 编译到正确的目录并调用 aspnet_compiler 时,我希望它使用 WebProjectOutputDir - 但它使用的是解决方案文件内指定的目录 Release.AspNetCompiler.TargetPath = "PrecompiledWeb\lidacweb\

我需要做什么才能让它接受这个论点?我错过了什么吗?

asp.net msbuild webforms aspnet-compiler visual-studio

5
推荐指数
0
解决办法
297
查看次数

正则表达式验证公司名称

我有这个RegEx来验证一些东西,不幸的是它不会验证PC只有PC - 我尝试在每个时期添加{0,1}但它仍然无法验证.有任何想法吗?

(可读性的新行字符)

/(^|\s)Corporation\.{0,1}(^|$)|
 (^|\s)Corp\.{0,1}(^|$)|
 (^|\s)Inc\.{0,1}(^|$)|
 (^|\s)Incorporated\.{0,1}(^|$)|
 (^|\s)Company\.{0,1}(^|$)|
 (^|\s)(^|$)|
 (^|\s)LTD\.{0,1}(^|$)|
 (^|\s)PLLC\.{0,1}(^|$)|
 (^|\s)P\.{0,1}C\.{0,1}(^|$)/ig;
Run Code Online (Sandbox Code Playgroud)

regex

0
推荐指数
1
解决办法
3092
查看次数

嵌套的SQL游标

在我的产品表中,我有14种产品,对于每种产品,我需要在美国的每个州都有一排.我试图通过以下方式实现这一目标:

begin tran
declare @state varchar(2),
        @productId int

declare stateCursor CURSOR FOR
select distinct [State]
from lookUpAreaFactor

declare productCursor CURSOR FOR
select distinct productid 
from Product


open stateCursor
open productCursor
FETCH NEXT from stateCursor into @state
fetch next from productCursor into @productId
while @@FETCH_STATUS = 0
BEGIN

        while @@FETCH_STATUS = 0
        BEGIN
            insert into ProductToState (ProductID,[State]) values (@productId,@state)
            fetch next from productCursor into @productId
        END
    fetch next from stateCursor into @state
END

close stateCursor
close productCursor
select * from producttostate …
Run Code Online (Sandbox Code Playgroud)

sql cursors sql-server-2014

-1
推荐指数
1
解决办法
312
查看次数