国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

.Net Framework 4.6.1+版本的Winform程序開啟Web服務(wù),支持Http webapi

這篇具有很好參考價值的文章主要介紹了.Net Framework 4.6.1+版本的Winform程序開啟Web服務(wù),支持Http webapi。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

背景

在很久以前為了滿足需求,已經(jīng)開發(fā)了一款winform程序,并且是4.6.1版本的,如今為了和第三方對接,需要在這個winform上提供WebAPI的接口。因為第三方的程序是一份沒有源碼的程序。

思路

方法1

  • 網(wǎng)上有很多自寫web服務(wù)的功能,個人覺得過于麻煩,而且還要考慮一些路由規(guī)則什么的,太難了

方法2

  • 使用iis或者nginx提供服務(wù),一個web程序和一個winform程序?qū)崿F(xiàn)通信,需要做兩個程序,還要交互,麻煩

方法3(本文使用的方法)

考慮4.6.1 版本剛好支持了netcore,所以可以將kestrel服務(wù)集成到winform中,直接提供webapi服務(wù)

實現(xiàn)

在winform程序中引入幾個nuget包

Microsoft.AspNetCore  Version="2.1.7"
Microsoft.AspNetCore.Mvc  Version="2.1.3"

在使用nuget引入的時候會將關(guān)聯(lián)的全部引入進來,完整的packages.config文件如下

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Microsoft.AspNetCore" version="2.1.7" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Antiforgery" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Authentication.Abstractions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Authentication.Core" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Authorization" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Authorization.Policy" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Connections.Abstractions" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Cors" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Cryptography.Internal" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.DataProtection" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.DataProtection.Abstractions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Diagnostics" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Diagnostics.Abstractions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.HostFiltering" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Hosting" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Hosting.Abstractions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Hosting.Server.Abstractions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Html.Abstractions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Http" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Http.Abstractions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Http.Extensions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Http.Features" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.HttpOverrides" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.HttpsPolicy" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.JsonPatch" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Localization" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Mvc" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Mvc.Abstractions" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Mvc.ApiExplorer" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Mvc.Core" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Mvc.Cors" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Mvc.DataAnnotations" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Mvc.Formatters.Json" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Mvc.Localization" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Mvc.Razor" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Mvc.Razor.Extensions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Mvc.RazorPages" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Mvc.TagHelpers" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Mvc.ViewFeatures" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Razor" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Razor.Design" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Razor.Language" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Razor.Runtime" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.ResponseCaching.Abstractions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Routing" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Routing.Abstractions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Server.IISIntegration" version="2.1.7" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Server.Kestrel" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Server.Kestrel.Core" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Server.Kestrel.Https" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets" version="2.1.3" targetFramework="net461" />
  <package id="Microsoft.AspNetCore.WebUtilities" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.CodeAnalysis.Analyzers" version="1.1.0" targetFramework="net461" />
  <package id="Microsoft.CodeAnalysis.Common" version="2.8.0" targetFramework="net461" />
  <package id="Microsoft.CodeAnalysis.CSharp" version="2.8.0" targetFramework="net461" />
  <package id="Microsoft.CodeAnalysis.Razor" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.CSharp" version="4.5.0" targetFramework="net461" />
  <package id="Microsoft.DiaSymReader.Native" version="1.7.0" targetFramework="net461" />
  <package id="Microsoft.DotNet.PlatformAbstractions" version="2.1.0" targetFramework="net461" />
  <package id="Microsoft.Extensions.Caching.Abstractions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Caching.Memory" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Configuration" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Configuration.Abstractions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Configuration.Binder" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Configuration.CommandLine" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Configuration.EnvironmentVariables" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Configuration.FileExtensions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Configuration.Json" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Configuration.UserSecrets" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.DependencyInjection" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.DependencyModel" version="2.1.0" targetFramework="net461" />
  <package id="Microsoft.Extensions.FileProviders.Abstractions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.FileProviders.Composite" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.FileProviders.Physical" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.FileSystemGlobbing" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Hosting.Abstractions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Localization" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Localization.Abstractions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Logging" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Logging.Configuration" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Logging.Console" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Logging.Debug" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.ObjectPool" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Options" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Options.ConfigurationExtensions" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.Primitives" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Extensions.WebEncoders" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Net.Http.Headers" version="2.1.1" targetFramework="net461" />
  <package id="Microsoft.Win32.Registry" version="4.5.0" targetFramework="net461" />
  <package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
  <package id="Newtonsoft.Json.Bson" version="1.0.1" targetFramework="net461" />
  <package id="System.AppContext" version="4.3.0" targetFramework="net461" />
  <package id="System.Buffers" version="4.5.0" targetFramework="net461" />
  <package id="System.Collections" version="4.3.0" targetFramework="net461" />
  <package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net461" />
  <package id="System.Collections.Immutable" version="1.5.0" targetFramework="net461" />
  <package id="System.ComponentModel.Annotations" version="4.5.0" targetFramework="net461" />
  <package id="System.Console" version="4.3.0" targetFramework="net461" />
  <package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net461" />
  <package id="System.Diagnostics.DiagnosticSource" version="4.5.1" targetFramework="net461" />
  <package id="System.Diagnostics.FileVersionInfo" version="4.3.0" targetFramework="net461" />
  <package id="System.Diagnostics.StackTrace" version="4.3.0" targetFramework="net461" />
  <package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net461" />
  <package id="System.Dynamic.Runtime" version="4.3.0" targetFramework="net461" />
  <package id="System.Globalization" version="4.3.0" targetFramework="net461" />
  <package id="System.IO.Compression" version="4.3.0" targetFramework="net461" />
  <package id="System.IO.FileSystem" version="4.3.0" targetFramework="net461" />
  <package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net461" />
  <package id="System.IO.Pipelines" version="4.5.3" targetFramework="net461" />
  <package id="System.Linq" version="4.3.0" targetFramework="net461" />
  <package id="System.Linq.Expressions" version="4.3.0" targetFramework="net461" />
  <package id="System.Memory" version="4.5.2" targetFramework="net461" />
  <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" />
  <package id="System.Reflection" version="4.3.0" targetFramework="net461" />
  <package id="System.Reflection.Metadata" version="1.6.0" targetFramework="net461" />
  <package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net461" />
  <package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net461" />
  <package id="System.Security.AccessControl" version="4.5.0" targetFramework="net461" />
  <package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net461" />
  <package id="System.Security.Cryptography.Cng" version="4.5.0" targetFramework="net461" />
  <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net461" />
  <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net461" />
  <package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net461" />
  <package id="System.Security.Cryptography.Xml" version="4.5.0" targetFramework="net461" />
  <package id="System.Security.Permissions" version="4.5.0" targetFramework="net461" />
  <package id="System.Security.Principal.Windows" version="4.5.1" targetFramework="net461" />
  <package id="System.Text.Encoding" version="4.3.0" targetFramework="net461" />
  <package id="System.Text.Encoding.CodePages" version="4.3.0" targetFramework="net461" />
  <package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net461" />
  <package id="System.Text.Encodings.Web" version="4.5.0" targetFramework="net461" />
  <package id="System.Threading" version="4.3.0" targetFramework="net461" />
  <package id="System.Threading.Tasks" version="4.3.0" targetFramework="net461" />
  <package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net461" />
  <package id="System.Threading.Tasks.Parallel" version="4.3.0" targetFramework="net461" />
  <package id="System.Threading.Thread" version="4.3.0" targetFramework="net461" />
  <package id="System.ValueTuple" version="4.3.0" targetFramework="net461" />
  <package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net461" />
  <package id="System.Xml.XDocument" version="4.3.0" targetFramework="net461" />
  <package id="System.Xml.XmlDocument" version="4.3.0" targetFramework="net461" />
  <package id="System.Xml.XPath" version="4.3.0" targetFramework="net461" />
  <package id="System.Xml.XPath.XDocument" version="4.3.0" targetFramework="net461" />
</packages>

新建一個Startup類(叫什么名字都行)

代碼如下

using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace 測試一個winform
{
    public class Startup
    {
        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;
        }

        public IConfiguration Configuration { get; }

        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
        }

        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseHsts();
            }

            app.UseHttpsRedirection();
            app.UseMvc();
        }
    }
}

修改Program文件

增加一個啟動web的方法,并且在main函數(shù)中將方法啟動
為了在后面能夠調(diào)用form1,所以我還將form1的對象改成了靜態(tài)的,代碼如下

using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 測試一個winform
{
    internal static class Program
    {
    //聲明一個靜態(tài)的
        public static Form1 mainForm;
        /// <summary>
        /// 應(yīng)用程序的主入口點。
        /// </summary>
        [STAThread]
        static void Main()
        {
        //啟動
            Task.Run(() => { CreateWebHostBuilder(new string[] { }).Build().Run(); }); 
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            mainForm = new Form1();
            Application.Run(mainForm);
        }

//新增加的代碼
        public static IWebHostBuilder CreateWebHostBuilder(string[] args)
        {
            return WebHost.CreateDefaultBuilder(args)
                .UseUrls("http://0.0.0.0:7001", "https://0.0.0.0:7002")
                   .UseStartup<Startup>();
        }
    }
}

創(chuàng)建controller

文件結(jié)構(gòu)如下
winform調(diào)用webapi,.net,前端,http

代碼內(nèi)容如下

using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using 測試一個winform;

namespace 測試一個winform集成web.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class ValuesController : ControllerBase
    {
        // GET api/values
        [HttpGet]
        public ActionResult<IEnumerable<string>> Get()
        {
            return new string[] { "value1", "value2" };
        }

        // GET api/values/5
        [HttpGet("{id}")]
        public ActionResult<string> Get(int id)
        {

            Program.mainForm.Message(id.ToString());
            return "value";
        } 
    }
}

運行效果(打開瀏覽器,輸入如下地址)

winform調(diào)用webapi,.net,前端,http

修改地址,調(diào)用get方法引起winform變動

winform調(diào)用webapi,.net,前端,http

winform中的message方法


        public void Message(string message)
        {
            //MessageBox.Show(message);
            this.Invoke(new Action(() => { button1.Text = message; }));
         
        }

關(guān)于配置端口和地址請查看文章

https://blog.csdn.net/iml6yu/article/details/100692488

https://blog.csdn.net/iml6yu/article/details/100692488

完整代碼下載

https://download.csdn.net/download/iml6yu/87726309

如果無法下載可以 QQ和我說 (復(fù)制下面給內(nèi)容到瀏覽器地址欄,按下回車 tencent://message/?uin=646007589&Site=&Menu=yes文章來源地址http://www.zghlxwxcb.cn/news/detail-627371.html

到了這里,關(guān)于.Net Framework 4.6.1+版本的Winform程序開啟Web服務(wù),支持Http webapi的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔相關(guān)法律責任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • [C#]vs2022安裝后C#創(chuàng)建winform沒有.net framework4.8

    [C#]vs2022安裝后C#創(chuàng)建winform沒有.net framework4.8

    問題,我已經(jīng)在visualstudio安裝程序中安裝了.net框架4.8的SDK和運行時。 然而,我在visual studio 2022中找不到已安裝的框架。 我已經(jīng)檢查了我的VS 2019,它可以很好地定位網(wǎng)絡(luò)框架4.8,它可以構(gòu)建我的項目。但VS 2022不能。 我已經(jīng)重新安裝了VS 2022和VS 2019,但VS 2022仍然找不到我的框

    2024年02月07日
    瀏覽(27)
  • C#桌面程序 winform 集成內(nèi)置WebApi C# 創(chuàng)建HTTP Web API服務(wù),winform項目創(chuàng)建HTTP WEB服務(wù),不使用IIS業(yè)務(wù) C#桌面程序WebApi C#winform集

    C#桌面程序 winform 集成內(nèi)置WebApi C# 創(chuàng)建HTTP Web API服務(wù),winform項目創(chuàng)建HTTP WEB服務(wù),不使用IIS業(yè)務(wù) C#桌面程序WebApi C#winform集

    ?在維護舊的項目時,有時需要提供APP連接的需求,就要提供HTTP服務(wù),winform項目就要提供HTTP服務(wù),就不用再去寫個c# web的IIS相關(guān)的業(yè)務(wù)了,簡化項目的復(fù)雜度。只需要簡單化實例就可以實現(xiàn)提供HTTP服務(wù)

    2024年02月08日
    瀏覽(37)
  • 【Visual Studio 2022創(chuàng)建ASP.NET Web應(yīng)用程序(.NET Framework)發(fā)布并部署到局域網(wǎng) 及“常見權(quán)限問題和不列出目錄問題解決”】

    【Visual Studio 2022創(chuàng)建ASP.NET Web應(yīng)用程序(.NET Framework)發(fā)布并部署到局域網(wǎng) 及“常見權(quán)限問題和不列出目錄問題解決”】

    然后給項目命名并選擇文件保存位置 用一個空項目進行舉例 創(chuàng)建完成如下 點擊更多模板選擇Web窗體 創(chuàng)建成功如下 .aspx頁面編寫前端代碼,.aspx.cs頁面編寫后端代碼 通過插入表格和拉取控件快速完成 然后給Button按鈕設(shè)置一個點擊事件,雙擊按鈕后會跳到.aspx.cs頁面,完善下面

    2024年02月07日
    瀏覽(85)
  • 開源:Taurus.DTC 微服務(wù)分布式事務(wù)框架,支持 .Net 和 .Net Core 雙系列版本

    開源:Taurus.DTC 微服務(wù)分布式事務(wù)框架,支持 .Net 和 .Net Core 雙系列版本

    在經(jīng)過1年多的深思,十幾年的框架編寫技術(shù)沉淀下,花了近一個月的時間,終于又為 .Net 及 .Net Core 的微服務(wù)系列框架貢獻當中的一個重要組件。 https://github.com/cyq1162/Taurus.DTC ? 由于 CYQ.Data?Orm 組件本身支持10多種數(shù)據(jù)庫,因此提供的包,只根據(jù)消息隊列的需要分拆提供。 默

    2024年02月02日
    瀏覽(20)
  • VS 2022支持 .NET Framework 4.5的方法

    VS 2022支持 .NET Framework 4.5的方法

    默認Visual Studio 2022 不再支持安裝 .NET Framework 4.5 組件 ? 為了避免裝回VS 2019,有以下解決辦法: 1.nuget 下載 4.5 安裝包 下載地址:NuGet Gallery | Microsoft.NETFramework.ReferenceAssemblies.net45 1.0.3 嫌官網(wǎng)下載慢的可以從下方下載 .net4.5 .net4.5.1 .net4.5.2 .net4.6.1? 2. 復(fù)制文件到系統(tǒng)目錄 以 z

    2024年02月07日
    瀏覽(51)
  • 一個.Net強大的Excel控件,支持WinForm、WPF、Android【強烈推薦】

    一個.Net強大的Excel控件,支持WinForm、WPF、Android【強烈推薦】

    推薦一個強大的電子表單控件,使用簡單且功能強大。 這是一個開源的表格控制組件,支持Winform、WPF和Android平臺,可以方便的加載、修改和導(dǎo)出Excel文件,支持數(shù)據(jù)格式、大綱、公式計算、圖表、腳本執(zhí)行等、還支持觸摸滑動,可以方便地操作表格。 總的來說是一個可以快

    2024年02月07日
    瀏覽(30)
  • VS2022 安裝 .NET Framework 4.0或.NET Framework 4.5 以及其他版本

    VS2022 安裝 .NET Framework 4.0或.NET Framework 4.5 以及其他版本

    VS2019升級到了VS2022之后,安裝時已經(jīng)不提供.NET Framework 4.0和.NET Framework 4.5的目標框架了,打開VS也提示不支持目標框架。 下載.NET Framework框架 官網(wǎng)下載對應(yīng)版本的sdk:https://dotnet.microsoft.com/zh-cn/download/visual-studio-sdks?cid=getdotnetsdk 點擊開發(fā)者工具包進行下載; 下載完之后直接雙

    2024年02月11日
    瀏覽(55)
  • Visual Studio 2022 增加對 .NET Framework 4.5 的支持

    Visual Studio 2022 增加對 .NET Framework 4.5 的支持

    VS2022默認最低只支持到 .NET Framework 4.5.2,在 .NET Framework 版本和依賴關(guān)系 可以看到 Windows Server 2012 默認安裝的是 4.5 的版本,如果老的服務(wù)器不方便升級,則需要軟件能支持 4.5 的版本 首先,新建 Test1 項目,.NET 版本隨便選擇 打開 工具 - NuGet 包管理器 - 管理解決方案的 NuGet

    2024年02月05日
    瀏覽(20)
  • 查看電腦.NET Framework版本和.NET5.0的安裝
  • 不同版本的 .NET Framework 下的 csc編譯器的版本

    以下是不同版本的 .NET Framework 下的 csc.exe 編譯器的版本: .NET Framework 2.0 - 3.5: csc.exe 版本:2.0.xxxxxx .NET Framework 4.x: .NET Framework 4.0: csc.exe 版本:4.0.xxxxxx .NET Framework 4.5 - 4.8: csc.exe 版本:4.0.xxxxxx .NET Framework 4.5.1 以及更新版本(4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8): csc.exe 版本

    2024年02月12日
    瀏覽(20)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包