Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

exception when I try to get started #1024

Open
WeihanLi opened this issue Apr 30, 2021 · 12 comments
Open

exception when I try to get started #1024

WeihanLi opened this issue Apr 30, 2021 · 12 comments
Labels
bug Something isn't working

Comments

@WeihanLi
Copy link

Describe the bug

Exception when I try to get started...

To Reproduce

Just installed the tool via dotnet tool install -g Microsoft.Tye --version "0.6.0-alpha.21070.5", and then try to run tye run in the solution dir, but got the exception below:

image

Further technical details

  • Include the output of tye --version: 0.6.0-alpha.21070.5+a42e4463943e3136dbd1de38474d8d62b802797c

  • If possible rerun the command with -v debug and include the output:
    image

  • The platform: Windows

@WeihanLi WeihanLi added the bug Something isn't working label Apr 30, 2021
@davidfowl
Copy link
Member

Do you have .net 5 installed?

@WeihanLi
Copy link
Author

Yeah, the dotnet --info output is as follows:

image

@BenLocal
Copy link

I got the same issues,after create a tye.yaml, then run successfully

@jkotalik
Copy link
Contributor

We are actively looking into this, seems to be an issue when the 6.0 preview SDK is installed. We had a dependency still on msbuild in-process, which we are trying to remove.

@davidfowl see #1008 for my attempt of a fix. It's spicy.

@jkotalik
Copy link
Contributor

To work around for now, you'd need to uninstall the 6.0-preview SDK (or maybe a global.json file would work, but I haven't tried).

@WeihanLi
Copy link
Author

WeihanLi commented May 1, 2021

Thanks @jkotalik , add a global.json with the content below, no exception like before

{
  "sdk": {
    "version": "5.0.100",
    "rollForward": "latestFeature"
  }
}

but got another error, seemed that it's because of my Dockerfile is not in the right place? My project is here if you wanna have a look.

image

@WeihanLi
Copy link
Author

WeihanLi commented May 1, 2021

I met another problem with docker-compose, I can start my app via docker-compose up but not with tye.
It seemed there's network issue from the error log

image

I add a link for the redis dependency in the docker-compose.yml, the compose file is as follows, you can find my project here https://github.com/OpenReservation/ReservationServer

version: '2.1'
services:
  redis:
    container_name: redis
    image: redis:alpine
    restart: always
    healthcheck:
        test: ["CMD", "redis-cli", "-h", "127.0.0.1", "PING"]
        interval: 30s
        timeout: 10s
        retries: 10

  db:
    container_name: mysql
    image: mysql:8.0
    environment:
      - 'MYSQL_ROOT_PASSWORD=Admin888'
    restart: always
    healthcheck:
        test: ["CMD", "mysqladmin", "ping"]
        interval: 30s
        timeout: 10s
        retries: 10

  reservation:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: reservation
    environment:
      - 'Reservation_AppSettings__DbType=MySql'
      - 'Reservation_ConnectionStrings__ElasticSearch='
      - 'Reservation_ConnectionStrings__Reservation=server=db-server;database=Reservation;uid=root;pwd=Admin888;'
      - 'Reservation_ConnectionStrings__Redis=redis-server'
    ports:
      - 65026:80
    depends_on:
      redis:
        condition: service_healthy
      db:
        condition: service_healthy
    links: 
      - db:db-server
      - redis:redis-server
      

@warappa
Copy link

warappa commented May 19, 2021

Evaluating project failed with exit code 1 is caused by installing Visual Studio 16.10 Preview 3/4.

Workaround

Uninstalling works around this issue for now.
See here: dotnet/msbuild#6373

@jkotalik
Copy link
Contributor

@WeihanLi if you try the latest nightlies, do you still see this issue: https://github.com/dotnet/tye/blob/main/docs/getting_started.md#working-with-ci-builds

@WeihanLi
Copy link
Author

Hey @jkotalik, I tried the latest nightly build, the first issue was fixed completely, while the docker-compose network issues still exists.

@jkotalik
Copy link
Contributor

I met another problem with docker-compose, I can start my app via docker-compose up but not with tye.

Are you saying that tye run isn't working due to this network issue? I'm a bit uncertain what the issue is here.

@WeihanLi
Copy link
Author

It seemed the app can not connect to redis which defined link relation in docker-compose file(maybe I should open another issue?)
image

It works when I use docker-compose up, but not with tye run

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants