Comments (8)
@mungk Have you had a chance to review this option?
from msbuild.sdk.systemweb.
Hi Cynthia, sorry I haven't been able to devote adequate time to this. Thanks for the advice and I'll keep working on it as my time allows. I'm going to go ahead and close the issue, though, since it does seem to be something on my end. Really appreciate everyone's help.
from msbuild.sdk.systemweb.
Thats an interesting question. I traditionally have the "Check out automatically" set as the behavior for both "Saving" and "Editing", so perhaps that has prevented me from experiencing this (or that the binding redirects are recalculated most frequently after changing NuGet Packages, which also triggers alterations to the web.config).
My expectation that attempting to perform a checkout via build scripts would be challenging, as it would likely need to tell the difference between TFVC and git style repos, and have a different behavior for each.
from msbuild.sdk.systemweb.
I have the same settings that you do and have for as long as I can remember. If it's working for you with those settings, perhaps there's something else throwing this wrench at me. Maybe the failure is not with MSBuild SDK but rather with something else that's preventing the automatic checkout from happening as it should. Thanks for the reply, I'll keep investigating.
from msbuild.sdk.systemweb.
@mungk I created a simple solution with a small project and a single dependency that will trigger a binding redirect (which is intentionally not currently in the web.config)
Checked into a TFVC style repo in AzureDevops, the solution containing my project and the web.config that is intentionally missing a binding redirect
The Local Build (Visual Studio -> Right Click -> Build) Succeeds for me
- The message in build output indicating the BindingRedirects were applied is present
- The "checked out" indicator on the web.config file in solution explorer
- The newly added binding redirect is present in the web.config
The Azure Devops Build (Build Pipeline) Succeeds for me
- The message in build output indicating the BindingRedirects were applied is present in the pipeline run logs
- The newly added binding redirect is present in the web.config contained in the published artifacts
I think there might be something specific about your workspace or workstation.
from msbuild.sdk.systemweb.
@leusbj Thanks for taking the time to recreate this. Unfortunately, I still have the problem but can't really figure out why. I have the same settings as you:
Under Team | Team Project Settings | Source Control... multiple check-outs are enabled:
And under Team Project Collection Settings, we are using Server workspaces rather than local.
In your recreation, did you happen to use Local or Server workspaces?
from msbuild.sdk.systemweb.
@mungk I haven't tested this personally, but you might be able to get the correct operation, even with readonly forced for checked in files, which is the default on Server workspaces.
<Target Name="SystemWebProject_TFVC_CheckOutForBindingRedirects"
DependsOnTargets="SystemWebProject_ChooseConfigFileForGenerateBindingRedirects"
BeforeTargets="GenerateBindingRedirects"
Condition="'$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true' and @(SuggestedBindingRedirects->Count()) > 0 ">
<PropertyGroup>
<TF>$(VSAPPIDDIR)CommonExtensions\Microsoft\TeamFoundation\Team Explorer\tf.exe</TF>
</PropertyGroup>
<!-- Automticly checkout files -->
<Exec Condition="( '$(GeneratedBindingRedirectsAction)' == 'Preview' or '$(GeneratedBindingRedirectsAction)' == 'Overwrite' ) and EXISTS('$(_GenerateBindingRedirectsIntermediateAppConfig)')"
Command=""$(TF)" checkout /noprompt "$(_GenerateBindingRedirectsIntermediateAppConfig)"">
</Exec>
</Target>
Make sure you are using the SDK version 4.0.81 or higher.
You might need other conditions added, as this doesn't actually check that TFVC is in use, and it might not be appropriate or work correctly on a build server etc.
I doubt this is something we would add directly to the SDK, although if it works for you, maybe it could be something we add to the documentation for those still using TFVC.
from msbuild.sdk.systemweb.
@mungk 🏓 Ping?
from msbuild.sdk.systemweb.
Related Issues (20)
- Environment-specific Web.config files do not end up in a deployment package HOT 2
- Add support for Central Package Management HOT 2
- Provide `CommandLineArgsForDesignTimeEvaluation`? HOT 4
- AutoGenerateBindingRedirects causes output xml attributes to change order randomly HOT 1
- Central Package Management - Default Package Restore Failure HOT 9
- "ASP.NET Core Module is required" when running in Visual Studio HOT 5
- MSBuild.SDK.SystemWeb/4.0.82 projects do not load in Visual Studio 2022 17.5.0 HOT 10
- Setting RoslynToolPath to allow ASPX compilation with newer language versions HOT 8
- Launch Profiles editor no longer works in the latest versions of Visual Studio (17.5+)
- MSBuild.SDK.SystemWeb.RazorLibrary does not support GeneratedBindingRedirectsAction feature
- Microsoft.CodeDom.Providers.DotNetCompilerPlatform should use the latest version dependant on the target framework version HOT 1
- error : Could not open Source file: Could not find file 'Web.config;Web.config' HOT 1
- IIS Express profile launchSettings.json does not add environment variables in the iisexpress.exe process HOT 5
- Configuration-specific Web.configs added to project even if they don't exist
- GenerateBindingRedirects task emits warning without code - unable to suppress HOT 3
- Broken intellisense and aspnet warnings on WebForms projects HOT 26
- VsCode's new C# DevKit fails to launch HOT 7
- Auto added aspnetcore handler and "module" HOT 2
- Add support for autogenerated binding redirects that are not source controlled HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msbuild.sdk.systemweb.