-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access to the path 'filePath'.feature.cs is denied - error message after update to version 3.1.89 #1911
Comments
Is this on your local machine or on a build server? |
On my local machine. |
I assume this is in Visual Studio. I looked at the changes between 3.1.86 and 3.1.89 and there isn't anything about file access. |
Btw, which .NET Core SDK are you using? We have some problems with the new 3.1.200 Sdk ( #1912 ) |
Thank you for the quick response to this ticket. |
I compile project in command line using MSBuild and I get error:
".csproj" (default target) (1) ->
After change version to 3.1.86, build succeeded. |
and with a |
Sorry for the long response time. Can you explain to me what you mean by writing "and with a dotnet build" because I didn't get it? For more information, this error is not related to new version. I get this error when I change some data in feature file too. For while change structure to be more flat ( shorter path) was solution but now I am still getting this error. |
You wrote that you used MSBuild to compile from commandline, so a |
@ZaPaw do you get this error? |
@SabotageAndi for a long time I havn't got this error. But code had few refactors. |
Ok, then I am closing this issue. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
SpecFlow Version:
Used Test Runner
Version number:
NUnit 3.12.0
NUnit3TestAdapter 3.16.1
Project Format of the SpecFlow project
packages.config
<PackageReference>
tags.feature.cs files are generated using
SpecFlow.Tools.MsBuild.Generation
NuGet packageSpecFlowSingleFileGenerator
custom toolVisual Studio Version
Enable SpecFlowSingleFileGenerator Custom Tool
option in Visual Studio extension settingsAre the latest Visual Studio updates installed?
.NET Framework:
Test Execution Method:
<SpecFlow> Section in app.config or content of specflow.json
Repro Project
Issue Description
After update: SpecFlow, SpecFlow.Tools.MsBuild.Generation and SpecFlow.NUnit from version 3.1.86 to version 3.1.89, I get error when I try to Build project. On 3.1.86 version everything was ok.
Error message:
"Severity Code Description Project File Line Suppression State
Error [SpecFlow] System.UnauthorizedAccessException: Access to the path 'filePath.feature.cs' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
at System.IO.File.WriteAllText(String path, String contents)
at SpecFlow.Tools.MsBuild.Generation.CodeBehindWriter.WriteCodeBehindFile(String outputPath, String featureFile, TestFileGeneratorResult testFileGeneratorResult)
at SpecFlow.Tools.MsBuild.Generation.FeatureFileCodeBehindGenerator.d__6.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator
2.MoveNext() at System.Linq.Buffer
1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable
1 source)at SpecFlow.Tools.MsBuild.Generation.ProjectCodeBehindGenerator.GenerateCodeBehindFilesForProject()
at SpecFlow.Tools.MsBuild.Generation.GenerateFeatureFileCodeBehindTaskExecutor.Execute() TheNgWeb.UiTest D:\Product\packages\specflow.tools.msbuild.generation\3.1.89\build\SpecFlow.Tools.MsBuild.Generation.targets 93
"
Steps to Reproduce
Update: SpecFlow, SpecFlow.Tools.MsBuild.Generation and SpecFlow.NUnit from version 3.1.86 to version 3.1.89 in NuGet Package Manager in Visual Studio 2017.
The text was updated successfully, but these errors were encountered: