Bug Report T827845
Visible to All Users

Test Runner - problem with DeploymentItem

created 5 years ago (modified 5 years ago)

[DevExpress Support Team: CLONED FROM T824083: Test Runner – The Test Runner fails after updating Microsoft.NET.Test.Sdk from 16.2.0 to 16.3.0 0]

I have now found a possibly related issue in that Deployment Items don't copy correctly.

In the previously attached example solution if you add an XML file named "Test.xml" to each of the projects and set Copy to Output Directory to Copy Always. Add the following test to the test classes:

C#
[TestMethod] [DeploymentItem("Test.xml")] public void DeploymentTest() { File.Exists("Test.xml").Should().BeTrue(); }

Running the test with TestRunner in the UnitTestErrorTests project results in an error similar to
Test Run deployment issue: Failed to copy file 'C:\Users\Chris\source\repos\UnitTestError\UnitTestErrorTests\bin\Debug\netcoreapp3.0\Test.xml' to 'C:\WINDOWS\system32\Test.xml': System.UnauthorizedAccessException: Access to the path 'C:\WINDOWS\system32\Test.xml' is denied.

Running the test in Visual Studio's Test Explorer works fine.

Comments (1)
PW PW
Przemyslaw Wlodarczak (DevExpress) 5 years ago

    Chris,
    Thank you for the update and such a detailed explanation. I was able to reproduce this issue and passed it to developers. Please bear with us.

    Answers approved by DevExpress Support

    created 5 years ago

    We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

    Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.