Telegram Group & Telegram Channel
Forwarded from Easy Microservices (Ali Yousefi ˢᵒᶠᵗʷᵃʳᵉ ᴰᵉᵛᵉˡᵒᵖᵉʳ)
C# Programming Guide
یه کار عجیب و باحال کردیم. این فایل های sln رو میبینید که تهش نسخه ی دات نت رو زده؟ اگر هر کدوم از اینارو اجرا کنید سلوشن و کلیه پروژه های داخلش با اون نسخه از دات اجرا میشه بدون اینکه لازم باشه TargetFramework رو توی csproj ها دست بزنید. یعنی اگر فردا دات…
میتونید سورسش رو ایجا ببینید:
https://github.com/EasyMicroservices/Serialization

اما چطوری اینکار رو کردیم؟
توسط شرط هایی که توی csproj ها اضافه کردیم این قابلیت به سیستم اضافه شده:

  <Choose>
<When Condition="$(SolutionFileName.Contains('-net'))">
<PropertyGroup>
<TargetFramework>$(SolutionFileName.Split('-')[1].Replace('.sln',''))</TargetFramework>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net6.0;net48;net452;net7.0</TargetFrameworks>
</PropertyGroup>
</Otherwise>
</Choose>


اینجا بهش گفتیم اگر توی اسم سلوشن -net وجود داشت بیاد TargetFramework رو از توی اسم فایل استخراج کنه در غیر اینصورت اون TargetFramework های پیشفرض رو در نظر بگیره.

@easymicroservice
@easymicroservices
@csharptips



tg-me.com/CsharpTips/406
Create:
Last Update:

میتونید سورسش رو ایجا ببینید:
https://github.com/EasyMicroservices/Serialization

اما چطوری اینکار رو کردیم؟
توسط شرط هایی که توی csproj ها اضافه کردیم این قابلیت به سیستم اضافه شده:

  <Choose>
<When Condition="$(SolutionFileName.Contains('-net'))">
<PropertyGroup>
<TargetFramework>$(SolutionFileName.Split('-')[1].Replace('.sln',''))</TargetFramework>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net6.0;net48;net452;net7.0</TargetFrameworks>
</PropertyGroup>
</Otherwise>
</Choose>


اینجا بهش گفتیم اگر توی اسم سلوشن -net وجود داشت بیاد TargetFramework رو از توی اسم فایل استخراج کنه در غیر اینصورت اون TargetFramework های پیشفرض رو در نظر بگیره.

@easymicroservice
@easymicroservices
@csharptips

BY C# Programming Guide





Share with your friend now:
tg-me.com/CsharpTips/406

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

What is Telegram Possible Future Strategies?

Cryptoassets enthusiasts use this application for their trade activities, and they may make donations for this cause.If somehow Telegram do run out of money to sustain themselves they will probably introduce some features that will not hinder the rudimentary principle of Telegram but provide users with enhanced and enriched experience. This could be similar to features where characters can be customized in a game which directly do not affect the in-game strategies but add to the experience.

To pay the bills, Mr. Durov is issuing investors $1 billion to $1.5 billion of company debt, with the promise of discounted equity if the company eventually goes public, the people briefed on the plans said. He has also announced plans to start selling ads in public Telegram channels as soon as later this year, as well as offering other premium services for businesses and users.

telegram from id


Telegram C# Programming Guide
FROM USA