VisualChatGPTStudio icon indicating copy to clipboard operation
VisualChatGPTStudio copied to clipboard

Update repo so can have a test project

Open graham83 opened this issue 2 years ago • 3 comments

I added a test project for working with the new chatgpt model - hoping you can restructure the repo so we can add a Test project?

graham83 avatar Mar 22 '23 01:03 graham83

I tried to make a build action available, but I wasn't successful in compiling the project.

The first problem is related to the project framework. Because the project uses the 4.8 framework, I had to set the build server to "windows-2019".

After this, when compiling the following error is triggered:

"C:\Users\runneradmin.nuget\packages\microsoft.vssdk.buildtools\17.5.4065\tools\VSSDK\Microsoft.VsSDK.targets(839,5): error VSSDK1048: Error trying to read the VSIX manifest file "obj\Release\extension.vsixmanifest". Could not load file or assembly 'Microsoft.VisualStudio.Interop, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. [D:\a\VisualChatGPTStudio\VisualChatGPTStudio\VisualChatGPTStudio.csproj]"

I tried in several ways to overcome this, such as adding the Microsoft.VisualStudio.Interop reference to the project, but it still didn't work.

I believe that to add Test Action to the project, first have to overcome this build problem (I believe it is not possible to run tests before compiling the project).

In any case, follow the definition of the build that I had created, in case someone notices what might be happening:

name: .NET

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]

jobs:
  build:

    runs-on: windows-2019

    steps:
    - uses: actions/checkout@v2

    - name: Setup MSBuild
      uses: microsoft/setup-msbuild@v1

    - name: Setup NuGet
      uses: NuGet/[email protected]

    - name: setup-msbuild
      uses: microsoft/[email protected]

    - name: Restore Packages
      run: nuget restore VisualChatGPTStudio.sln

    - name: Build solution
      run: msbuild VisualChatGPTStudio.sln -t:rebuild -property:Configuration=Release

jeffdapaz avatar Mar 22 '23 11:03 jeffdapaz

Sorry - not quite following. I haven't set up build actions in GitHub before. For this issue I was mainly requesting the main repo restructured to contain a standalone test .csproj. I had to make the test project .NET 6 to overcome build errors.

image

graham83 avatar Mar 22 '23 22:03 graham83

Sorry, I misunderstood what you were asking.

However, I see that you have already managed to add a test project, right?

If so, no problem, even if you're using .NET 6, if you're already able to run the tests, that's what matters.

Do you still need me to change something?

jeffdapaz avatar Mar 22 '23 23:03 jeffdapaz